-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update emailMFACode step to confirmSignInWithOTP
- Loading branch information
Showing
5 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,14 +97,14 @@ class EmailMFATests: BasePluginTest { | |
} | ||
} | ||
|
||
/// Test a signIn with valid inputs getting confirmSignInWithEmailMFACode challenge | ||
/// Test a signIn with valid inputs getting confirmSignInWithOTP challenge | ||
/// | ||
/// - Given: Given an auth plugin with mocked service. | ||
/// | ||
/// - When: | ||
/// - I invoke signIn with valid values | ||
/// - Then: | ||
/// - I should get a .confirmSignInWithEmailMFACode response | ||
/// - I should get a .confirmSignInWithOTP response | ||
/// | ||
func testSuccessfulEmailMFACodeStep() async { | ||
var signInStepIterator = 0 | ||
|
@@ -134,8 +134,8 @@ class EmailMFATests: BasePluginTest { | |
username: "username", | ||
password: "password", | ||
options: AuthSignInRequest.Options()) | ||
guard case .confirmSignInWithEmailMFACode(let codeDetails) = result.nextStep else { | ||
XCTFail("Result should be .confirmSignInWithEmailMFACode for next step, instead got: \(result.nextStep)") | ||
guard case .confirmSignInWithOTP(let codeDetails) = result.nextStep else { | ||
XCTFail("Result should be .confirmSignInWithOTP for next step, instead got: \(result.nextStep)") | ||
return | ||
} | ||
if case .email(let destination) = codeDetails.destination { | ||
|
@@ -232,7 +232,7 @@ class EmailMFATests: BasePluginTest { | |
signInStepIterator = 1 | ||
confirmSignInResult = try await plugin.confirmSignIn( | ||
challengeResponse: "[email protected]") | ||
guard case .confirmSignInWithEmailMFACode(let deliveryDetails) = confirmSignInResult.nextStep else { | ||
guard case .confirmSignInWithOTP(let deliveryDetails) = confirmSignInResult.nextStep else { | ||
XCTFail("Result should be .continueSignInWithEmailMFASetup but got: \(confirmSignInResult.nextStep)") | ||
return | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters