Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Commit 0e1222f

Browse files
Merge pull request #6 from passageidentity/rickycpadilla-patch-1
Update README.md
2 parents 1e5d249 + b37fa19 commit 0e1222f

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ const passageFlex = new PassageFlex('YOUR_APP_ID');
7777

7878
To register a new user passkey, use the `passageFlex.passkey.register` method.
7979

80+
This is a three step process:
81+
1. Your app should POST a user identifier (like an email) to your backend, which should request a transaction id from the Passage server to return to your app.
82+
2. Your app should then call `passageFlex.passkey.register(transactionId)` to prompt your user to create a passkey. On success, the `register` method will return a nonce.
83+
3. Lastly, your app should send this nonce to your backend to verify the user has been registered successfully. At this point, your backend could return an access token.
84+
8085
Example:
8186

8287
```tsx
@@ -86,13 +91,20 @@ const onPressRegister = async () => {
8691
// 2. Prompt user to create a passkey and get a Passage nonce value on success.
8792
const nonce = await passageFlex.passkey.register(transactionId);
8893
// 3. You can send this nonce to your backend to complete user registration.
94+
const accessToken = await getAccessToken(nonce);
8995
};
9096
```
9197

9298
### passageFlex.passkey.authenticate
9399

94100
To log in a user using a passkey, use the `passageFlex.passkey.authenticate` method.
95101

102+
This is a three step process:
103+
1. Your app should POST a user identifier (like an email) to your backend, which should request a transaction id from the Passage server to return to your app.
104+
2. Your app should then call `passageFlex.passkey.authenticate(transactionId)` to prompt your user to log in with a passkey. On success, the `authenticate` method will return a nonce.
105+
3. Lastly, your app should send this nonce to your backend to verify the user has been authenticated successfully. At this point, your backend could return an access token.
106+
107+
96108
Example:
97109

98110
```tsx
@@ -102,6 +114,7 @@ const onPressLogIn = async () => {
102114
// 2. Prompt user to create a passkey and get a Passage nonce value on success.
103115
const nonce = await passageFlex.passkey.authenticate(transactionId);
104116
// 3. You can send this nonce to your backend to complete user authentication.
117+
const accessToken = await getAccessToken(nonce);
105118
};
106119
```
107120

0 commit comments

Comments
 (0)