You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passkey Flex provides passkey support for existing authentication systems. It abstracts the complexities of native passkey APIs and provides a simple, clean solution to take your authentication to the next level.
8
+
[Passage by 1Password](https://1password.com/product/passage) unlocks the passwordless future with a simpler, more secure passkey authentication experience. Passage handles the complexities of the [WebAuthn API](https://blog.1password.com/what-is-webauthn/), and allows you to implement passkeys with ease.
8
9
9
-
The `passage_flex` Rust crate allows for verification of server-side authentication for applications using [Passage Passkey Flex](https://passage.id).
10
+
Use [Passkey Flex](https://docs.passage.id/flex) to add passkeys to an existing authentication experience.
10
11
11
-
For full documentation, visit the [Passkey Flex Docs](https://docs-v2.passage.id/flex) and [Docs.rs](https://docs.rs/passage_flex/latest/passage_flex/) pages.
12
+
Use [Passkey Complete](https://docs.passage.id/complete) as a standalone passwordless auth solution.
12
13
13
-
## Installation
14
+
Use [Passkey Ready](https://docs.passage.id/passkey-ready) to determine if your users are ready for passkeys.
14
15
15
-
Install this crate using cargo:
16
+
### In passage-flex-rust
17
+
18
+
Use passage-flex-rust to implement Passkey Flex into your Rust backend to authenticate requests and manage users.
| Passkey **Complete**| ✖️ For Passkey Complete, check out the [Passkey Complete APIs](https://docs.passage.id/complete/backend-sdks)|
24
+
| Passkey **Ready**| ✖️ For Passkey Ready, check out [Authentikit](https://www.npmjs.com/package/@passageidentity/authentikit)|
25
+
26
+
## Getting Started
27
+
28
+
### Check Prerequisites
29
+
30
+
<p>
31
+
You'll need a free Passage account and a Passkey Flex app set up in <ahref="https://console.passage.id/">Passage Console</a> to get started. <br />
32
+
<sub><ahref="https://docs.passage.id/home#passage-console">Learn more about Passage Console →</a></sub>
33
+
</p>
34
+
35
+
### Install
16
36
17
37
```shell
18
38
cargo add passage_flex
19
39
```
20
40
21
-
## Create a PassageFlex instance
22
-
23
-
A Passage AppID and API key are required. An App and AppID can be created in the Passage Console, and an API key can be created under your Application Settings. This API key grants access to the Passage management APIs to get and update information about users. This API key must be protected and stored in an appropriate secure storage location. It should never be hard-coded in the repository.
41
+
### Import
24
42
25
43
```rust
26
44
usepassage_flex::PassageFlex;
45
+
```
46
+
47
+
### Initialize
27
48
49
+
```rust
28
50
letpassage_flex=PassageFlex::new(
29
-
std::env::var("PASSAGE_APP_ID").unwrap(),
30
-
std::env::var("PASSAGE_API_KEY").unwrap(),
51
+
std::env::var("YOUR_PASSAGE_APP_ID").unwrap(),
52
+
std::env::var("YOUR_PASSAGE_API_KEY").unwrap(),
31
53
);
32
54
```
33
55
34
-
## Retrieve app info
56
+
### Go Passwordless
57
+
58
+
Find more details about Passkey Flex on our [Passkey Flex Documentation](https://docs.passage.id/flex) and [Docs.rs](https://docs.rs/passage_flex/latest/passage_flex/) pages.
59
+
60
+
## API Reference
61
+
62
+
### Retrieve App Info
35
63
36
64
To retrieve information about the app, use the `get_app` method.
37
65
@@ -47,7 +75,7 @@ let app_info = passage_flex.get_app().await.unwrap();
47
75
println!("{}", app_info.auth_origin);
48
76
```
49
77
50
-
## Create a registration transaction
78
+
###Create a Registration Transaction
51
79
52
80
To create a transaction to start a user passkey registration, use the `create_register_transaction` method.
53
81
@@ -69,7 +97,7 @@ let transaction = passage_flex
69
97
.unwrap();
70
98
```
71
99
72
-
## Create an authentication transaction
100
+
###Create an Authentication Transaction
73
101
74
102
To create a transaction to start a user passkey authentication, use the `create_authenticate_transaction` method.
75
103
@@ -89,7 +117,7 @@ let transaction = passage_flex
89
117
.unwrap();
90
118
```
91
119
92
-
## Verify a nonce
120
+
## Verify a Nonce
93
121
94
122
To verify a nonce that you received from the end of of passkey registration or authentication ceremony, use the `verify_nonce` method.
95
123
@@ -114,7 +142,7 @@ match passage_flex.verify_nonce(nonce).await {
114
142
}
115
143
```
116
144
117
-
## Retrieve user info
145
+
## Retrieve User Info
118
146
119
147
To retrieve information about a user by their external ID -- which is the unique, immutable ID you supply to associate the Passage user with your user -- use the `get_user` method.
120
148
@@ -156,7 +184,7 @@ for device in passkey_devices {
156
184
}
157
185
```
158
186
159
-
## Revoke a user's passkey device
187
+
## Revoke a User's Passkey Device
160
188
161
189
To revoke a user's passkey device, use the `revoke_device` method.
162
190
@@ -191,3 +219,24 @@ for device in passkey_devices {
191
219
}
192
220
}
193
221
```
222
+
223
+
## Support & Feedback
224
+
225
+
We are here to help! Find additional docs, the best ways to get in touch with our team, and more within our [support resources](https://github.com/passageidentity/.github/blob/main/SUPPORT.md).
<img alt="Passage by 1Password Logo" src="https://storage.googleapis.com/passage-docs/github-md-assets/passage-by-1password-light.png">
236
+
</picture>
237
+
</p>
238
+
239
+
<palign="center">
240
+
<sub>Passage is a product by <a href="https://1password.com/product/passage">1Password</a>, the global leader in access management solutions with nearly 150k business customers.</sub><br />
241
+
<sub>This project is licensed under the MIT license. See the <a href="LICENSE">LICENSE</a> file for more info.</sub>
0 commit comments