-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allowing DeviceBinding NONE
option on Simulators
#308
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,11 +180,15 @@ open class DeviceSigningVerifierCallback: MultipleValuesCallback, Binding { | |
customClaims: [String: Any] = [:], | ||
prompt: Prompt? = nil, | ||
_ completion: @escaping DeviceSigningResultCallback) { | ||
|
||
if userKey.authType != .none { | ||
#if targetEnvironment(simulator) | ||
// DeviceBinding/Signing is not supported on the iOS Simulator | ||
handleException(status: .unsupported(errorMessage: "DeviceBinding/Signing is not supported on the iOS Simulator"), completion: completion) | ||
return | ||
// DeviceBinding/Signing other than `.NONE` type is not supported on the iOS Simulator | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we add some tests for this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tests were failing and fixed based on that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry didnt notice this test class update, when I add my comment, and at the same time u pushed. |
||
handleException(status: .unsupported(errorMessage: "DeviceBinding/Signing is not supported on the iOS Simulator"), completion: completion) | ||
return | ||
#endif | ||
} | ||
|
||
authInterface.initialize(userId: userKey.userId, prompt: prompt ?? Prompt(title: title, subtitle: subtitle, description: promptDescription)) | ||
guard authInterface.isSupported() else { | ||
handleException(status: .unsupported(errorMessage: nil), completion: completion) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add some tests for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests were failing and fixed based on that