svelte-passkey-example

description

This repository demonstrates usage and implementation of passkeys with sveltekit

setup

Copy the file .env.example to .env and fill in your values for the empty variables.

environment variables for development:

e.g.

ORIGIN=localhost
EXPECTED_ORIGIN=http://localhost:5173

environment variables for production:

e.g.

ORIGIN=auth.mydomain.org
EXPECTED_ORIGIN=https://auth.mydomain.org

scope

experimentation, prototyping, not meant (yet!) for production usage

status

This is a prototype at the current state in order to try out passkeys / passwordless login.

Please do not blame me if it does not work on your setup, it might require different settings for fido2Create & fido2Get functions.

This example only works with passkeys. Tested was a Yubico Yubikey 5. I would like to test more. If you can reproduce it with another (e.g. Nitrokey), let me know by creating an issue.

inspiration

Thanks to

it is possible to do passwordless login with the code provided here.

Top categories

Loading Svelte Themes