ColourStream uses a modern, secure authentication system that prioritizes passkey (WebAuthn) authentication over traditional password-based authentication. This system is designed to provide both security and convenience while encouraging the use of biometric authentication methods.
- Uses the WebAuthn standard for passwordless authentication
- Supports biometric authentication (fingerprint, face recognition)
- Device-based security using platform authenticators
- Once set up, becomes the primary authentication method
- Available only when no passkeys are registered
- Used for initial admin access
- Automatically disabled once passkeys are registered
- Can be re-enabled only by removing all passkeys
- When passkeys exist, password authentication is automatically disabled
- Password login attempts are rejected if passkeys are registered
- System enforces passkey usage once configured
- Initial admin password is configurable via
ADMIN_PASSWORD
in.env
- Password authentication is disabled when:
- Passkeys are registered, OR
ADMIN_PASSWORD
is empty in.env
- Password can be removed after passkey setup
# WebAuthn Configuration in .env
WEBAUTHN_RP_ID=live.colourstream.johnrogerscolour.co.uk
WEBAUTHN_ORIGIN=https://live.colourstream.johnrogerscolour.co.uk
- Set
ADMIN_PASSWORD
in.env
for first-time access - Log in using the password
- Register a passkey when prompted
- Navigate to the Admin Dashboard
- Look for the "Passkey Management" section
- Click "Register Passkey"
- Follow browser prompts for biometric/PIN setup
- Ensure at least one passkey is registered
- Go to Admin Dashboard
- Click "Remove Password Authentication"
- System will switch to passkey-only mode
- Register at least two passkeys:
- Primary device passkey
- Backup device passkey
- Remove password authentication after passkey setup
- Keep
ADMIN_PASSWORD
empty in production to enforce passkey usage
model WebAuthnCredential {
id String @id @default(uuid())
credentialId String @unique
publicKey String
counter BigInt
userId String @unique // Single admin user
transports String? // JSON string of allowed transports
createdAt DateTime @default(now())
lastUsed DateTime @default(now())
}
- System checks for registered passkeys
- If passkeys exist:
- Force passkey authentication
- Reject password attempts
- If no passkeys:
- Check
ADMIN_PASSWORD
setting - Allow password login if set
- Force passkey setup if empty
- Check
- Cannot remove the last passkey when password auth is disabled
- Cannot remove password auth without at least one passkey
- Cannot register duplicate passkeys
-
Cannot Log In with Password
- Check if passkeys are registered (password login will be disabled)
- Verify
ADMIN_PASSWORD
is set in.env
(if no passkeys)
-
Passkey Registration Failed
- Ensure browser supports WebAuthn
- Check domain configuration matches
WEBAUTHN_RP_ID
- Verify HTTPS is properly configured
-
Cannot Remove Password Authentication
- Verify at least one passkey is registered
- Check if you're properly authenticated
If locked out:
- Access the database directly
- Clear the WebAuthnCredential table
- Set
ADMIN_PASSWORD
in.env
- Restart the authentication process