An implementation of authentication with passkeys using the go-webauthn library
Start Postgres and Redis with Docker Compose:
docker compose up
Setup the database:
go run ./db/migration db init
go run ./db/migration db migrate
This is to test password managers like bitwarden.
This will create a custom HTTPS url that will route traffic to your your local server. In this case
http://localhost:9044
ngrok http http://localhost:9044
Look for the Forwarding output.
Forwarding https://51ed-47-150-126-75.ngrok-free.app -> http://localhost:9044
Fix up the .env file.
RP_DISPLAY_NAME=PasskeyDemo
RP_ID=51ed-47-150-126-75.ngrok-free.app
RP_ORIGIN=https://51ed-47-150-126-75.ngrok-free.app
Start the server:
go run .