Skip to content

Register and login with passkeys using go-webauthn

Notifications You must be signed in to change notification settings

fluffy-bunny/passkey-demo

 
 

Repository files navigation

Passkey Demo

An implementation of authentication with passkeys using the go-webauthn library

Local Setup

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

NGROK

This is to test password managers like bitwarden.

Bitwarden Registration

alt text

Bitwarden login

alt text 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 .

About

Register and login with passkeys using go-webauthn

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 73.8%
  • JavaScript 19.8%
  • CSS 3.8%
  • HTML 2.6%