Skip to content
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

New passkey auth methods #22

Merged
merged 2 commits into from
May 2, 2024
Merged

New passkey auth methods #22

merged 2 commits into from
May 2, 2024

Conversation

rickycpadilla
Copy link
Collaborator

@rickycpadilla rickycpadilla commented May 1, 2024

What's new

Log in in with identifier

Developers can now provide an explicit identifier to loginWithPasskey.

Authenticator Attachments

Developers can now set PasskeyCreationOptions when calling passage.registerWithPasskey.
This new object contains one property called authenticatorAttachments which provides developers with more granular control of their users' passkey creation experience.
You can learn more about authenticator attachments in the WebAuthn spec.

Example code

// Log in with identifier
// User will only be shown passkeys with that identifier for your app.
await passage.loginWithPasskey("[email protected]");

// Log in without identifier
// User will be shown all passkeys available to them for your app, potentially showing multiple identifiers.
await passage.loginWithPasskey();

// Register with options example
// Give user option to register with a physical security key or another mobile device
const options: PasskeyCreationOptions = {
    authenticatorAttachment: AuthenticatorAttachment.CrossPlatform
};
await passage.registerWithPasskey("[email protected]", options);

// Register without options
// Authenticator attachment will default to "platform", same as before.
await passage.registerWithPasskey("[email protected]")

User experience

Example UI for "cross-platform" or "any" authenticator attachment option.

@rickycpadilla rickycpadilla requested a review from a team May 2, 2024 00:07
@rickycpadilla rickycpadilla marked this pull request as ready for review May 2, 2024 00:07
Copy link
Contributor

@jenn-macfarlane jenn-macfarlane left a comment

Choose a reason for hiding this comment

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

"Let them eat identifiers" 🍰

@rickycpadilla rickycpadilla merged commit 95b890a into main May 2, 2024
3 checks passed
@rickycpadilla rickycpadilla deleted the PSG-3833-new-auth-methods branch September 6, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants