@azure/msal-browser
Version:
Microsoft Authentication Library for js
48 lines (45 loc) • 2.08 kB
JavaScript
/*! @azure/msal-browser v5.30.0 2026-11-18 */
;
import { AuthFlowActionRequiredStateBase } from '../../../../core/auth_flow/AuthFlowState.mjs';
import { CustomAuthResultV2 } from '../../../../core/auth_flow/v2/CustomAuthResultV2.mjs';
import { CompletedStateV2 } from '../../../../core/auth_flow/v2/state/CompletedStateV2.mjs';
import { CustomAuthAccountData } from '../../../../get_account/auth_flow/CustomAuthAccountData.mjs';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* State returned when a completed V2 flow can sign the user in.
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
*/
class SignInContinuationStateV2 extends AuthFlowActionRequiredStateBase {
constructor() {
super(...arguments);
this.stateType = "signInContinuation";
}
/**
* Signs the user in after completing the V2 flow.
* @returns The result of completing the continuation sign-in.
*/
async signIn() {
const { correlationId, logger, continuationState, flowClient } = this.stateParameters;
try {
logger.verbose("09mk3f", correlationId);
const result = await flowClient.signInWithContinuation({
correlationId,
continuationState,
});
const account = new CustomAuthAccountData(result.authenticationResult.account, this.stateParameters.config, this.stateParameters.cacheClient, logger, correlationId);
return new CustomAuthResultV2(new CompletedStateV2(), account, continuationState.scenario);
}
catch (error) {
logger.errorPii(`0zoo5u ${error}`, correlationId);
return CustomAuthResultV2.createWithError(error, {
scenario: continuationState.scenario,
correlationId,
});
}
}
}
export { SignInContinuationStateV2 };
//# sourceMappingURL=SignInContinuationStateV2.mjs.map