Skip to content

Commit fa49d9c

Browse files
Native auth: Update Email OTP MFA to Match EC Implementation, Fixes AB#3351233 (#2760)
This PR updates the SDK to match the latest flow from EC. In this new flow, the developer must always supply an auth Method to the /oauth2/v2.0/challenge endpoint which means once the .mfaRequired error is received from token endpoint, the /oauth2/v2.0/introspect endpoint needs to be called to retrieve the methods which are automatically returned to the external developer. Furthermore, whenever calling the /token endpoint is called with an MFA Email OTP code, the grant type should be mfa_oob Fixes [AB#3351233](https://identitydivision.visualstudio.com/Engineering/_workitems/edit/3351233) MSAL PR: AzureAD/microsoft-authentication-library-for-android#2379 --------- Co-authored-by: Mustafa Mizrak <mustafamizrak@gmail.com>
1 parent f3aac73 commit fa49d9c

File tree

23 files changed

+187
-565
lines changed

23 files changed

+187
-565
lines changed

common/src/main/java/com/microsoft/identity/common/nativeauth/internal/commands/GetAuthMethodsCommand.kt

Lines changed: 0 additions & 72 deletions
This file was deleted.

common/src/main/java/com/microsoft/identity/common/nativeauth/internal/commands/MFAChallengeCommand.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ package com.microsoft.identity.common.nativeauth.internal.commands
2424

2525
import com.microsoft.identity.common.java.logging.LogSession
2626
import com.microsoft.identity.common.java.logging.Logger
27-
import com.microsoft.identity.common.java.nativeauth.commands.parameters.MFADefaultChallengeCommandParameters
27+
import com.microsoft.identity.common.java.nativeauth.commands.parameters.MFAChallengeAuthMethodCommandParameters
2828
import com.microsoft.identity.common.java.nativeauth.controllers.results.MFAChallengeCommandResult
2929
import com.microsoft.identity.common.nativeauth.internal.controllers.NativeAuthMsalController
3030

@@ -33,7 +33,7 @@ import com.microsoft.identity.common.nativeauth.internal.controllers.NativeAuthM
3333
* {@see com.microsoft.identity.common.java.controllers.CommandDispatcher}.
3434
*/
3535
class MFAChallengeCommand(
36-
private val parameters: MFADefaultChallengeCommandParameters,
36+
private val parameters: MFAChallengeAuthMethodCommandParameters,
3737
private val controller: NativeAuthMsalController,
3838
publicApiId: String
3939
) : BaseNativeAuthCommand<MFAChallengeCommandResult>(

0 commit comments

Comments
 (0)