@azure/msal-browser
Version:
Microsoft Authentication Library for js
41 lines (38 loc) • 1.59 kB
JavaScript
/*! @azure/msal-browser v5.25.0 2026-10-06 */
;
import { CustomAuthResultV2 } from '../../../../core/auth_flow/v2/CustomAuthResultV2.mjs';
import { SubmitAttributesErrorV2 } from '../error_type/SubmitAttributesErrorV2.mjs';
import { SignUpAttributesRequiredStateBaseV2 } from './SignUpAttributesRequiredStateBaseV2.mjs';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* State returned when sign-up requires profile or custom attributes.
*/
class AttributesRequiredStateV2 extends SignUpAttributesRequiredStateBaseV2 {
constructor() {
super(...arguments);
this.stateType = "attributesRequired";
}
/**
* Submits the attributes requested by the latest server response.
*/
async submitAttributes(attributes) {
const { correlationId, logger, continuationState } = this.stateParameters;
try {
const result = await this.submitAttributesAction(attributes);
return this.stateParameters.signUpStateTransitionHandler.handleAttributeSubmission(result, this.stateParameters, "attribute");
}
catch (error) {
logger.errorPii(`0l4w01 ${error}`, correlationId);
return CustomAuthResultV2.createWithError(error, {
errorType: SubmitAttributesErrorV2,
scenario: continuationState.scenario,
correlationId,
});
}
}
}
export { AttributesRequiredStateV2 };
//# sourceMappingURL=AttributesRequiredStateV2.mjs.map