You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Log in to an organization](#log-in-to-an-organization)
@@ -404,62 +397,6 @@ authentication
404
397
405
398
> The default scope used is `openid profile email`. Regardless of the scopes set to the request, the `openid` scope is always enforced.
406
399
407
-
### Login using MFA with One Time Password code
408
-
409
-
This call requires the client to have the *MFA* Client Grant Type enabled. Check [this article](https://auth0.com/docs/clients/client-grant-types) to learn how to enable it.
410
-
411
-
When you sign in to a multifactor authentication enabled connection using the `login` method, you receive an error standing that MFA is required for that user along with an `mfa_token` value. Use this value to call `loginWithOTP` and complete the MFA flow passing the One Time Password from the enrolled MFA code generator app.
2. Call that endpoint from your app, passing the user's access token as a `Bearer` token in the `Authorization` header.
111
112
3. On your backend, obtain a machine-to-machine token via the Client Credentials flow and use it to call the Management API with the precise scopes required.
112
113
114
+
### Deprecated MFA Methods Removed from AuthenticationAPIClient
115
+
116
+
The following MFA methods have been removed from `AuthenticationAPIClient`. They were deprecated in v3 in favor of the `MfaApiClient` class APIs.
Use `AuthenticationAPIClient.mfaClient(mfaToken)` to obtain a `MfaApiClient` instance and handle MFA flows using the new APIs. See the [MFA Flexible Factors Grant](EXAMPLES.md#mfa-flexible-factors-grant) section in `EXAMPLES.md` for usage guidance.
124
+
113
125
### DPoP Configuration Moved to Builder
114
126
115
127
The `useDPoP(context: Context)` method has been moved from the `WebAuthProvider` object to the login
@@ -175,42 +174,6 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe
175
174
}
176
175
177
176
178
-
/**
179
-
* Log in a user using the One Time Password code after they have received the 'mfa_required' error.
180
-
* The MFA token tells the server the username or email, password, and realm values sent on the first request.
181
-
*
182
-
* Requires your client to have the **MFA OTP** Grant Type enabled. See [Client Grant Types](https://auth0.com/docs/clients/client-grant-types) to learn how to enable it.
183
-
*
184
-
* Example usage:
185
-
*
186
-
*```
187
-
* client.loginWithOTP("{mfa token}", "{one time password}")
* override fun onFailure(error: AuthenticationException) { }
191
-
* override fun onSuccess(result: Credentials) { }
192
-
* })
193
-
*```
194
-
*
195
-
* @param mfaToken the token received in the previous [.login] response.
196
-
* @param otp the one time password code provided by the resource owner, typically obtained from an
197
-
* MFA application such as Google Authenticator or Guardian.
198
-
* @return a request to configure and start that will yield [Credentials]
199
-
*/
200
-
@Deprecated(
201
-
message ="loginWithOTP is deprecated and will be removed in the next major version of the SDK. Use the APIs in the [com.auth0.android.authentication.mfa.MfaApiClient] class instead.",
* This should be called after the client has received the passkey challenge from the server and generated the public key response.
@@ -391,132 +354,6 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe
391
354
.addParameters(parameters)
392
355
}
393
356
394
-
/**
395
-
* Log in a user using an Out Of Band authentication code after they have received the 'mfa_required' error.
396
-
* The MFA token tells the server the username or email, password, and realm values sent on the first request.
397
-
*
398
-
* Requires your client to have the **MFA OOB** Grant Type enabled. See [Client Grant Types](https://auth0.com/docs/clients/client-grant-types) to learn how to enable it.
399
-
*
400
-
* Example usage:
401
-
*
402
-
*```
403
-
* client.loginWithOOB("{mfa token}", "{out of band code}", "{binding code}")
* override fun onFailure(error: AuthenticationException) { }
407
-
* override fun onSuccess(result: Credentials) { }
408
-
* })
409
-
*```
410
-
*
411
-
* @param mfaToken the token received in the previous [.login] response.
412
-
* @param oobCode the out of band code received in the challenge response.
413
-
* @param bindingCode the code used to bind the side channel (used to deliver the challenge) with the main channel you are using to authenticate.
414
-
* This is usually an OTP-like code delivered as part of the challenge message.
415
-
* @return a request to configure and start that will yield [Credentials]
416
-
*/
417
-
@Deprecated(
418
-
message ="loginWithOOB is deprecated and will be removed in the next major version of the SDK. Use the APIs in the [com.auth0.android.authentication.mfa.MfaApiClient] class instead.",
* Log in a user using a multi-factor authentication Recovery Code after they have received the 'mfa_required' error.
437
-
* The MFA token tells the server the username or email, password, and realm values sent on the first request.
438
-
*
439
-
* Requires your client to have the **MFA** Grant Type enabled. See [Client Grant Types](https://auth0.com/docs/clients/client-grant-types) to learn how to enable it.
* override fun onFailure(error: AuthenticationException) { }
448
-
* override fun onSuccess(result: Credentials) { }
449
-
* })
450
-
*```
451
-
*
452
-
* @param mfaToken the token received in the previous [.login] response.
453
-
* @param recoveryCode the recovery code provided by the end-user.
454
-
* @return a request to configure and start that will yield [Credentials]. It might also include a [recoveryCode] field,
455
-
* which your application must display to the end-user to be stored securely for future use.
456
-
*/
457
-
@Deprecated(
458
-
message ="loginWithRecoveryCode is deprecated and will be removed in the next major version of the SDK. Use the APIs in the [com.auth0.android.authentication.mfa.MfaApiClient] class instead.",
* override fun onFailure(error: AuthenticationException) { }
483
-
* override fun onSuccess(result: Challenge) { }
484
-
* })
485
-
*```
486
-
*
487
-
* @param mfaToken the token received in the previous [.login] response.
488
-
* @param challengeType A whitespace-separated list of the challenges types accepted by your application.
489
-
* Accepted challenge types are oob or otp. Excluding this parameter means that your client application
490
-
* accepts all supported challenge types.
491
-
* @param authenticatorId The ID of the authenticator to challenge.
492
-
* @return a request to configure and start that will yield [Challenge]
493
-
*/
494
-
@Deprecated(
495
-
message ="multifactorChallenge is deprecated and will be removed in the next major version of the SDK. Use the APIs in the [com.auth0.android.authentication.mfa.MfaApiClient] class instead.",
496
-
level =DeprecationLevel.WARNING
497
-
)
498
-
publicfunmultifactorChallenge(
499
-
mfaToken:String,
500
-
challengeType:String? = null,
501
-
authenticatorId:String? = null
502
-
): Request<Challenge, AuthenticationException> {
503
-
val parameters =ParameterBuilder.newBuilder()
504
-
.setClientId(clientId)
505
-
.set(MFA_TOKEN_KEY, mfaToken)
506
-
.set(CHALLENGE_TYPE_KEY, challengeType)
507
-
.set(AUTHENTICATOR_ID_KEY, authenticatorId)
508
-
.asDictionary()
509
-
val url = auth0.getDomainUrl().toHttpUrl().newBuilder()
510
-
.addPathSegment(MFA_PATH)
511
-
.addPathSegment(CHALLENGE_PATH)
512
-
.build()
513
-
val challengeAdapter:JsonAdapter<Challenge> =GsonAdapter(
* Log in a user using a token obtained from a Native Social Identity Provider, such as Facebook, using ['\oauth\token' endpoint](https://auth0.com/docs/api/authentication#token-exchange-for-native-social)
522
359
* The default scope used is 'openid profile email'.
@@ -1128,13 +965,7 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe
0 commit comments