-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f682c9
commit a9915c7
Showing
2 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Passkeys with SimpleWebAuthn & Firebase | ||
|
||
- Creating (user registration), retrieving (user login), linking, removing of passkeys. | ||
- Issuing a JWT token via Firebase Auth once user is authenticated. | ||
- Passkes are stored in Firebase Firestore. | ||
- Formatting and parsing of WebAuthn API request / responses done via SimpleWebAuthn library. | ||
|
||
## Development | ||
|
||
### How to start it locally? | ||
|
||
Assuming you've already finished [those steps in the main README](../../README.md), let's proceed: | ||
|
||
1. Setup Firebase: | ||
|
||
1. Create a new Firebase project | ||
|
||
2. Copy `.env.template.local` to `.env.local`: | ||
|
||
- Fill up all those `NEXT_PUBLIC_FIREBASE_` env. vars. | ||
|
||
3. Copy `.env.template.server` to `.env.server`: | ||
|
||
- Create a new private key in `Firebase > Project settings > Service accounts`. | ||
- Fill up all those `Firebase_` env. vars. | ||
|
||
4. Don't forget to add `localhost` as Authorized domain in Firebase: | ||
|
||
- Firebase > Authentication > Settings > Authorised domains. | ||
|
||
5. Create a Firebase firestore database | ||
|
||
2. Run `yarn dev` and checkout `http://localhost:3000` URL. |