614 B
614 B
Plan for how authentication will work
Frontend auth
Registration
- Send username to registration endpoint
- Get webauthn options
- Perform webauthn check (selecting and confirming passkey)
- Server verifies response
- Minimal account ready for login
Login
- Send username to login endpoint
- Error out if user doesn't exist
- Get webauthn options from response
- Get passkey response
- Send response to Server
- Server checks and gives ok or fail. Ok also sets a server only cookie with an access token
api
- Generate API token via frontend
- Use api token for authorisation