Skip to content

Commit 1691947

Browse files
authored
[Native Auth] Remove preview warning and typo fix (#8147)
1 parent 3c83743 commit 1691947

File tree

15 files changed

+27
-46
lines changed

15 files changed

+27
-46
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "[Native Auth] Remove preview warning and typo fix",
4+
"packageName": "@azure/msal-browser",
5+
"email": "shen.jian@live.com",
6+
"dependentChangeType": "patch"
7+
}

lib/msal-browser/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export class AuthMethodRegistrationChallengeMethodResult extends AuthFlowResultB
4444
/**
4545
* Checks if the result indicates that verification is required.
4646
* @returns true if verification is required, false otherwise.
47-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
4847
*/
4948
isVerificationRequired(): this is AuthMethodRegistrationChallengeMethodResult & {
5049
state: AuthMethodVerificationRequiredState;
@@ -58,7 +57,6 @@ export class AuthMethodRegistrationChallengeMethodResult extends AuthFlowResultB
5857
/**
5958
* Checks if the result indicates that registration is completed (fast-pass scenario).
6059
* @returns true if registration is completed, false otherwise.
61-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
6260
*/
6361
isCompleted(): this is AuthMethodRegistrationChallengeMethodResult & {
6462
state: AuthMethodRegistrationCompletedState;
@@ -72,7 +70,6 @@ export class AuthMethodRegistrationChallengeMethodResult extends AuthFlowResultB
7270
/**
7371
* Checks if the result is in a failed state.
7472
* @returns true if the result is failed, false otherwise.
75-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
7673
*/
7774
isFailed(): this is AuthMethodRegistrationChallengeMethodResult & {
7875
state: AuthMethodRegistrationFailedState;

lib/msal-browser/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export class AuthMethodRegistrationSubmitChallengeResult extends AuthFlowResultB
4141
/**
4242
* Checks if the result indicates that registration is completed.
4343
* @returns true if registration is completed, false otherwise.
44-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
4544
*/
4645
isCompleted(): this is AuthMethodRegistrationSubmitChallengeResult & {
4746
state: AuthMethodRegistrationCompletedState;
@@ -55,7 +54,6 @@ export class AuthMethodRegistrationSubmitChallengeResult extends AuthFlowResultB
5554
/**
5655
* Checks if the result is in a failed state.
5756
* @returns true if the result is failed, false otherwise.
58-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
5957
*/
6058
isFailed(): this is AuthMethodRegistrationSubmitChallengeResult & {
6159
state: AuthMethodRegistrationFailedState;

lib/msal-browser/src/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ abstract class AuthMethodRegistrationState<
123123
);
124124
}
125125
} catch (error) {
126-
this.stateParameters.logger.error(
127-
"Failed to challenge authentication method for auth method registration.",
126+
this.stateParameters.logger.errorPii(
127+
`Failed to challenge authentication method for auth method registration. Error: ${error}.`,
128128
this.stateParameters.correlationId
129129
);
130130
return AuthMethodRegistrationChallengeMethodResult.createWithError(
@@ -146,7 +146,6 @@ export class AuthMethodRegistrationRequiredState extends AuthMethodRegistrationS
146146
/**
147147
* Gets the available authentication methods for registration.
148148
* @returns Array of available authentication methods.
149-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
150149
*/
151150
getAuthMethods(): AuthenticationMethod[] {
152151
return this.stateParameters.authMethods;
@@ -156,7 +155,6 @@ export class AuthMethodRegistrationRequiredState extends AuthMethodRegistrationS
156155
* Challenges an authentication method for registration.
157156
* @param authMethodDetails The authentication method details to challenge.
158157
* @returns Promise that resolves to AuthMethodRegistrationChallengeMethodResult.
159-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
160158
*/
161159
async challengeAuthMethod(
162160
authMethodDetails: AuthMethodDetails
@@ -177,7 +175,6 @@ export class AuthMethodVerificationRequiredState extends AuthMethodRegistrationS
177175
/**
178176
* Gets the length of the expected verification code.
179177
* @returns The code length.
180-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
181178
*/
182179
getCodeLength(): number {
183180
return this.stateParameters.codeLength;
@@ -186,7 +183,6 @@ export class AuthMethodVerificationRequiredState extends AuthMethodRegistrationS
186183
/**
187184
* Gets the channel through which the challenge was sent.
188185
* @returns The challenge channel (e.g., "email").
189-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
190186
*/
191187
getChannel(): string {
192188
return this.stateParameters.challengeChannel;
@@ -195,7 +191,6 @@ export class AuthMethodVerificationRequiredState extends AuthMethodRegistrationS
195191
/**
196192
* Gets the target label indicating where the challenge was sent.
197193
* @returns The challenge target label (e.g., masked email address).
198-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
199194
*/
200195
getSentTo(): string {
201196
return this.stateParameters.challengeTargetLabel;
@@ -205,7 +200,6 @@ export class AuthMethodVerificationRequiredState extends AuthMethodRegistrationS
205200
* Submits the verification challenge to complete the authentication method registration.
206201
* @param code The verification code entered by the user.
207202
* @returns Promise that resolves to AuthMethodRegistrationSubmitChallengeResult.
208-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
209203
*/
210204
async submitChallenge(
211205
code: string
@@ -250,8 +244,8 @@ export class AuthMethodVerificationRequiredState extends AuthMethodRegistrationS
250244
accountInfo
251245
);
252246
} catch (error) {
253-
this.stateParameters.logger.error(
254-
"Failed to submit auth method challenge.",
247+
this.stateParameters.logger.errorPii(
248+
`Failed to submit auth method challenge. Error: ${error}.`,
255249
this.stateParameters.correlationId
256250
);
257251
return AuthMethodRegistrationSubmitChallengeResult.createWithError(
@@ -264,7 +258,6 @@ export class AuthMethodVerificationRequiredState extends AuthMethodRegistrationS
264258
* Challenges a different authentication method for registration.
265259
* @param authMethodDetails The authentication method details to challenge.
266260
* @returns Promise that resolves to AuthMethodRegistrationChallengeMethodResult.
267-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
268261
*/
269262
async challengeAuthMethod(
270263
authMethodDetails: AuthMethodDetails

lib/msal-browser/src/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export class MfaRequestChallengeResult extends AuthFlowResultBase<
3636
/**
3737
* Checks if the result indicates that verification is required.
3838
* @returns true if verification is required, false otherwise.
39-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
4039
*/
4140
isVerificationRequired(): this is MfaRequestChallengeResult & {
4241
state: MfaVerificationRequiredState;
@@ -47,7 +46,6 @@ export class MfaRequestChallengeResult extends AuthFlowResultBase<
4746
/**
4847
* Checks if the result is in a failed state.
4948
* @returns true if the result is failed, false otherwise.
50-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
5149
*/
5250
isFailed(): this is MfaRequestChallengeResult & {
5351
state: MfaFailedState;

lib/msal-browser/src/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export class MfaSubmitChallengeResult extends AuthFlowResultBase<
3737
/**
3838
* Checks if the MFA flow is completed successfully.
3939
* @returns true if completed, false otherwise.
40-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
4140
*/
4241
isCompleted(): this is MfaSubmitChallengeResult & {
4342
state: MfaCompletedState;
@@ -48,7 +47,6 @@ export class MfaSubmitChallengeResult extends AuthFlowResultBase<
4847
/**
4948
* Checks if the result is in a failed state.
5049
* @returns true if the result is failed, false otherwise.
51-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
5250
*/
5351
isFailed(): this is MfaSubmitChallengeResult & {
5452
state: MfaFailedState;

lib/msal-browser/src/custom_auth/core/auth_flow/mfa/state/MfaState.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ abstract class MfaState<
3131
* Requests an MFA challenge for a specific authentication method.
3232
* @param authMethodId The authentication method ID to use for the challenge.
3333
* @returns Promise that resolves to MfaRequestChallengeResult.
34-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
3534
*/
3635
async requestChallenge(
3736
authMethodId: string
@@ -101,7 +100,6 @@ export class MfaAwaitingState extends MfaState<MfaAwaitingStateParameters> {
101100
/**
102101
* Gets the available authentication methods for MFA.
103102
* @returns Array of available authentication methods.
104-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
105103
*/
106104
getAuthMethods(): AuthenticationMethod[] {
107105
return this.stateParameters.authMethods;
@@ -121,7 +119,6 @@ export class MfaVerificationRequiredState extends MfaState<MfaVerificationRequir
121119
/**
122120
* Gets the length of the code that the user needs to provide.
123121
* @returns The expected code length.
124-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
125122
*/
126123
getCodeLength(): number {
127124
return this.stateParameters.codeLength;
@@ -130,7 +127,6 @@ export class MfaVerificationRequiredState extends MfaState<MfaVerificationRequir
130127
/**
131128
* Gets the channel through which the challenge was sent.
132129
* @returns The challenge channel (e.g., "email").
133-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
134130
*/
135131
getChannel(): string {
136132
return this.stateParameters.challengeChannel;
@@ -139,7 +135,6 @@ export class MfaVerificationRequiredState extends MfaState<MfaVerificationRequir
139135
/**
140136
* Gets the target label indicating where the challenge was sent.
141137
* @returns The challenge target label (e.g., masked email address).
142-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
143138
*/
144139
getSentTo(): string {
145140
return this.stateParameters.challengeTargetLabel;
@@ -149,7 +144,6 @@ export class MfaVerificationRequiredState extends MfaState<MfaVerificationRequir
149144
* Submits the MFA challenge (e.g., OTP code) to complete the authentication.
150145
* @param challenge The challenge code (e.g., OTP code) entered by the user.
151146
* @returns Promise that resolves to MfaSubmitChallengeResult.
152-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
153147
*/
154148
async submitChallenge(
155149
challenge: string

lib/msal-browser/src/custom_auth/sign_in/auth_flow/result/SignInResult.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ export class SignInResult extends AuthFlowResultBase<
8383

8484
/**
8585
* Checks if the result requires authentication method registration.
86-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
8786
*/
8887
isAuthMethodRegistrationRequired(): this is SignInResult & {
8988
state: AuthMethodRegistrationRequiredState;
@@ -96,7 +95,6 @@ export class SignInResult extends AuthFlowResultBase<
9695

9796
/**
9897
* Checks if the result requires MFA.
99-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
10098
*/
10199
isMfaRequired(): this is SignInResult & { state: MfaAwaitingState } {
102100
return this.state.stateType === MFA_AWAITING_STATE_TYPE;

lib/msal-browser/src/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ export class SignInSubmitCodeResult extends AuthFlowResultBase<
5757

5858
/**
5959
* Checks if the result requires authentication method registration.
60-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
6160
*/
6261
isAuthMethodRegistrationRequired(): this is SignInSubmitCodeResult & {
6362
state: AuthMethodRegistrationRequiredState;
@@ -70,7 +69,6 @@ export class SignInSubmitCodeResult extends AuthFlowResultBase<
7069

7170
/**
7271
* Checks if the result requires MFA.
73-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
7472
*/
7573
isMfaRequired(): this is SignInSubmitCodeResult & {
7674
state: MfaAwaitingState;

lib/msal-browser/src/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export class SignInSubmitPasswordResult extends AuthFlowResultBase<
5454

5555
/**
5656
* Checks if the result requires authentication method registration.
57-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
5857
*/
5958
isAuthMethodRegistrationRequired(): this is SignInSubmitPasswordResult & {
6059
state: AuthMethodRegistrationRequiredState;
@@ -67,7 +66,6 @@ export class SignInSubmitPasswordResult extends AuthFlowResultBase<
6766

6867
/**
6968
* Checks if the result requires MFA.
70-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
7169
*/
7270
isMfaRequired(): this is SignInSubmitPasswordResult & {
7371
state: MfaAwaitingState;

0 commit comments

Comments
 (0)