Skip to content

Add support for signing up with passkey [SDK-4974]#942

Merged
Widcket merged 30 commits intomasterfrom
feature/passkeys-signup
Apr 29, 2025
Merged

Add support for signing up with passkey [SDK-4974]#942
Widcket merged 30 commits intomasterfrom
feature/passkeys-signup

Conversation

@Widcket
Copy link
Contributor

@Widcket Widcket commented Apr 28, 2025

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

📋 Changes

This PR adds two new methods to the Authentication API client:

  • passkeySignupChallenge(email:phoneNumber:username:name:connection:): Requests a challenge for registering a new user with a passkey. This is the first part of the passkey signup flow.
  • login(signupPasskey:signupChallenge:connection:audience:scope:): Logs a user in using a signup passkey credential and the signup challenge. This is the last part of the passkey signup flow.

📎 References

🎯 Testing

Unit tests were added, and the feature was manually tested e2e with a iPhone simulator running iOS 18.4, using Xcode 16.3 (16E140).

@Widcket Widcket requested a review from a team as a code owner April 28, 2025 22:34
- [Authentication API Endpoint](https://auth0.com/docs/api/authentication#refresh-token)
- [Refresh Tokens](https://auth0.com/docs/secure/tokens/refresh-tokens)
*/
func ssoExchange(withRefreshToken: String) -> Request<SSOCredentials, AuthenticationError>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to address a DoCC warning:

Screenshot 2025-04-28 at 12 56 12

Since this is the internal parameter (the external one is withRefreshToken), it has no bearing on the public API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refreshToken is already the internal parameter in the actual implementing type.

/// - Parameters:
/// - parameters: Additional parameters to use.
/// - headers: Additional headers to use.
/// - callback: Callback that receives a `Result` containing either the renewed user's credentials or an error.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The async/await wrapper has no callback.

telemetry: self.telemetry)
}

#if !os(tvOS) && !os(watchOS)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the implementation of the login method.

logger: self.logger,
telemetry: self.telemetry)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the implementation of the request challenge method.

@Widcket Widcket enabled auto-merge (squash) April 29, 2025 09:09
@Widcket Widcket merged commit d2b221d into master Apr 29, 2025
10 checks passed
@Widcket Widcket deleted the feature/passkeys-signup branch April 29, 2025 09:16
@Widcket Widcket mentioned this pull request May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants