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

Add WebAuthn and Magic Links in auth-nextjs #897

Merged
merged 8 commits into from Mar 21, 2024
Merged

Conversation

scotttrinh
Copy link
Collaborator

@scotttrinh scotttrinh commented Mar 7, 2024

EdgeDB 5.0 adds two new passwordless authentication mechanisms: WebAuthn and Magic Links.

  • WebAuthn doesn't support a Server Actions flow since it is a back-and-forth ceremony via JSON that makes some client-side calls, so webauthn methods are exported as a separate module. This necessitated breaking the app router into server and client parts as well, but I left the "server" export as index.ts. Should I update that? Alias it?
  • The documentation needs a pretty big overhaul to cover how you would set up each different authentication flow, but that feels out of scope for this PR. Will add as part of the 5.0 effort.
  • Terminology is a little muddled in the Magic Link flow: sign-in vs send being the most obvious one. I'd like to get some feedback here and update to be consistent: What should the action that sends an email to an already registered Magic Link factor be named? Feels like "send" is more correct, but is that confusing?

Also set the type to non-optional in the callback definition. Consumers
are still welcome to provide functions that ignore that parameter but
this ensures that we always provide it.
@scotttrinh scotttrinh merged commit 0306030 into master Mar 21, 2024
7 of 8 checks passed
@scotttrinh scotttrinh deleted the 877-auth-nextjs branch March 21, 2024 14:51
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.

None yet

1 participant