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

feat(sveltekit): webauthn provider support #9924

Merged
merged 100 commits into from May 11, 2024
Merged

Conversation

ndom91
Copy link
Member

@ndom91 ndom91 commented Feb 6, 2024

☕️ Reasoning

  • Copies the changes from the next-auth client
  • Also made a new signIn import which includes the webauthn import
  • Also bumped to use @simplewebauth/server@9.0.2 which should fix the import node:crypto issue on edge runtimes
  • The unstorage "DB" is using the "filesystem" driver, meaning it'll write its "db" to /apps/dev/sveltekit/tmp-unstorage. This makes the saving of your webauthn authenticators persist across restarts of your dev server, like HMR, etc. The unstorage tmp dir is a part of the .gitignore 👍

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

📌 Resources

@ndom91 ndom91 merged commit e17cc71 into main May 11, 2024
12 of 15 checks passed
@ndom91 ndom91 deleted the ndom91/add-webauthn-to-sveltekit branch May 11, 2024 12:25
* @returns WebAuthn response or error
*/
async function webAuthnOptions(providerId: string, options?: SignInOptions) {
const baseUrl = `${base}/auth/`
Copy link
Contributor

@sillvva sillvva May 17, 2024

Choose a reason for hiding this comment

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

There's a mistake here with the ending /. Below an additional / is added after baseUrl. Results in a 404

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.

None yet

6 participants