Skip to content

Conversation

@hectormmg
Copy link
Member

This pull request introduces significant documentation and configuration updates to improve clarity, onboarding, and maintainability for the MSAL.js repository, with a particular focus on the new Native Authentication (Custom Auth) feature. The changes include detailed architectural and code structure guides, usage patterns, and contribution instructions, as well as updates to project configuration files.

Documentation Additions and Improvements:

  • Added a comprehensive Copilot instructions guide (.github/copilot-instructions.md) describing repository structure, package dependencies, review guidelines, and best practices for documentation, testing, telemetry, and changefile management.
  • Introduced a detailed requirements and usage guide for the Native Authentication (Custom Auth) feature, including API design principles, error handling, state machine patterns, security, extensibility, and a full TypeScript usage example (.github/instructions/custom_auth_product.instructions.md).
  • Provided an in-depth code structure and organization guide for the Custom Auth feature, outlining directory layout, naming conventions, component relationships, interface patterns, extension patterns, and testing organization (.github/instructions/custom_auth_structure.instructions.md).
  • Added instructions for proper changefile creation and review, specifying when to use each change type and how to format messages (.github/instructions/changefiles.instructions.md).

Configuration Updates:

  • Changed the default branch in .beachballrc from dev to msal-v5 to align with current development practices.

Minor Template Update:

  • Removed the unused storeAuthStateInCookie property from the bug report issue template YAML.

Copilot AI review requested due to automatic review settings January 5, 2026 08:15
@hectormmg hectormmg changed the base branch from dev to msal-v5 January 5, 2026 08:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces comprehensive documentation and structural improvements to support the Native Authentication (Custom Auth) feature in MSAL.js v5, along with significant architectural refactoring to modernize the codebase.

Key Changes:

  • Added detailed Copilot instructions and coding guidelines for the new Custom Auth feature
  • Implemented complete Custom Auth public API with configuration, constants, and action inputs
  • Refactored core controllers and cache management to remove deprecated APIs and improve performance tracking
  • Updated cryptography operations to include correlation IDs for better telemetry
  • Modernized browser cache management with encryption support and schema versioning

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/msal-browser/src/custom_auth/CustomAuthConfiguration.ts Defines configuration types for Custom Auth feature
lib/msal-browser/src/custom_auth/UserAccountAttributes.ts Defines user account attribute types for Custom Auth
lib/msal-browser/src/custom_auth/ICustomAuthPublicClientApplication.ts Interface defining Custom Auth public API methods
lib/msal-browser/src/custom_auth/CustomAuthPublicClientApplication.ts Main entry point implementation for Custom Auth
lib/msal-browser/src/custom_auth/CustomAuthConstants.ts Constants and enums for Custom Auth feature
lib/msal-browser/src/custom_auth/CustomAuthActionInputs.ts Input type definitions for Custom Auth actions
lib/msal-browser/src/crypto/SignedHttpRequest.ts Updated to include correlation IDs and StubPerformanceClient
lib/msal-browser/src/crypto/PkceGenerator.ts Refactored to use browser-specific performance events
lib/msal-browser/src/crypto/CryptoOps.ts Updated to include correlation IDs throughout
lib/msal-browser/src/crypto/BrowserCrypto.ts Simplified sha256Digest signature
lib/msal-browser/src/controllers/StandardController.ts Major refactor adding accountSource tracking and updating event handling
lib/msal-browser/src/controllers/NestedAppAuthController.ts Updated to add accountSource "naa" when caching accounts
lib/msal-browser/src/cache/TokenCache.ts Refactored from class to standalone functions with accountSource support
lib/msal-browser/src/cache/BrowserCacheManager.ts Extensive updates for cache migration, encryption, and accountSource tracking

result.account,
{
...result.account,
accountSource: "pwb",
Copy link
Collaborator

@tnorling tnorling Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use API names or a number tag, we can't assume this is a PWB call

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest using ApiId actually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants