Skip to content

Conversation

@yongdiw
Copy link
Contributor

@yongdiw yongdiw commented Jun 29, 2025

This pull request introduces a comprehensive implementation of a Native Authentication sample app using the Microsoft Authentication Library (MSAL) for JavaScript. The changes include detailed documentation, new core classes, and expanded functionality for authentication flows like sign-in, sign-up, and password reset.

Documentation Enhancements:

  • Added a new README.md for the Native Auth Sample, detailing authentication flows, project structure, key components, and end-to-end test cases. This includes configurations for email/password, email/OTP, and redirect-based flows, along with both positive and negative test scenarios.

Core Functionality:

  • Introduced the NativeAuthApp class in app.js as the main entry point for the application. It initializes the MSAL instance, handles navigation between forms, and provides methods for sign-in, sign-up, and password reset flows.

User Attribute Management:

  • Added the UserAccountAttributes class in UserAccountAttributes.js to manage custom user attributes like first name, last name, and display name. This supports the sign-up flow with customizable attributes.

@github-actions github-actions bot added documentation Related to documentation. samples Related to the samples apps for the library. labels Jun 29, 2025
@github-actions github-actions bot added the msal-browser Related to msal-browser package label Aug 8, 2025

if (errorBanner && errorMessageElement) {
// Format the message with flow context
let formattedMessage = errorMessage;
*/
cleanup() {
// Remove all tracked event listeners
for (const [key, listenerInfo] of this.activeListeners) {
*/
cleanup() {
// Remove all tracked event listeners
for (const [key, listenerInfo] of this.activeListeners) {
Comment on lines +7 to +16
import {
Screenshot,
createFolder,
getBrowser,
pcaInitializedPoller,
BrowserCacheUtils,
ONE_SECOND_IN_MS,
LabClient,
getHomeUrl,
} from "e2e-test-utils";
Comment on lines +21 to +28
import {
testConfig,
getTenantInfo,
getProxyPort,
getTestUsers,
getTestData,
nativeAuthConfig
} from "./testConfig";

// Use configuration instead of hardcoded values
const SCREENSHOT_BASE_FOLDER_NAME = path.join(__dirname, testConfig.screenshots.baseFolderName, "/signout");
const STANDARD_TIMEOUT = testConfig.timeouts.standard;
const SCREENSHOT_BASE_FOLDER_NAME = path.join(__dirname, testConfig.screenshots.baseFolderName, "/signout");
const STANDARD_TIMEOUT = testConfig.timeouts.standard;
const AUTH_TIMEOUT = testConfig.timeouts.auth;
const TEST_TIMEOUT = testConfig.timeouts.test;
Comment on lines +7 to +16
import {
Screenshot,
createFolder,
getBrowser,
pcaInitializedPoller,
BrowserCacheUtils,
ONE_SECOND_IN_MS,
LabClient,
getHomeUrl,
} from "e2e-test-utils";
Comment on lines +21 to +28
import {
testConfig,
getTenantInfo,
getProxyPort,
getTestUsers,
getTestData,
nativeAuthConfig
} from "./testConfig";

// Use configuration instead of hardcoded values
const SCREENSHOT_BASE_FOLDER_NAME = path.join(__dirname, testConfig.screenshots.baseFolderName, "/resetpassword");
const STANDARD_TIMEOUT = testConfig.timeouts.standard;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Related to documentation. msal-browser Related to msal-browser package samples Related to the samples apps for the library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants