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
Copy file name to clipboardExpand all lines: src/guide/admin-console/applications.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -50,3 +50,9 @@ You should now be able to call `https://v4.passwordless.dev/signin/generate-toke
50
50
Magic Links provides you with the ability to email your users a link that will redirect them to your application without having to configure your own email provider. This feature can be enabled by going to the **Settings** page, scrolling to the **Magic Links** section, checking the box, and clicking Save.
51
51
52
52
You should now be able to call `https://v4.passwordless.dev/magic-links/send` to send Magic Link emails to your users. For more information, please refer to the [documentation](../api.md#magic-links-send).
53
+
54
+
### Authentication Configurations
55
+
56
+
Authentication Configurations allow you to fine tune the tokens being used through the `signin` or `stepup` client methods. The two default purposes are `sign-in` and `step-up`. You can configure the TTL on each of them and change the User Verification requirement. However, they cannot be deleted.
57
+
58
+
You can create additional configurations to suit your needs and pass through the purposes through the `stepup()` client method.
Copy file name to clipboardExpand all lines: src/guide/api.md
+129Lines changed: 129 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -402,6 +402,135 @@ If successful, the `/magic-links/send` endpoint will return an HTTP 204 (No Cont
402
402
403
403
If Magic Links has not been enabled, the `/magic-links/send` endpoint will return an HTTP 403 (Unauthorized) [status code](#status-codes) along with a message about enabling the Magic Links feature.
404
404
405
+
## `/auth-configs/list`
406
+
407
+
### Request
408
+
409
+
`GET` requests made to the `/auth-configs/list` endpoint will return a `.json` object containing a list of authentication configurations that can be used by the application. It can be filtered to one specific configuration by passing the purpose name as a query parameter.
410
+
411
+
```http request
412
+
GET https://v4.passwwordless.dev/auth-configs/list HTTP/1.1
For more information about Authentication Configurations, please see the [concepts page](concepts.md#authentication-configurations).
422
+
423
+
### Response
424
+
425
+
If successful, the `/auth-configs/list` endpoint will return a `.json` object containing a list of authentication configurations:
426
+
427
+
```json
428
+
{
429
+
"configurations": [
430
+
{
431
+
"purpose": "sign-in",
432
+
"timeToLive": 120,
433
+
"userVerificationRequirement": "preferred",
434
+
"createdBy": "System",
435
+
"createdOn": null,
436
+
"editedBy": null,
437
+
"editedOn": null,
438
+
"lastUsedOn": null
439
+
},
440
+
{
441
+
"purpose": "step-up",
442
+
"timeToLive": 180,
443
+
"userVerificationRequirement": "required",
444
+
"createdBy": "System",
445
+
"createdOn": null,
446
+
"editedBy": null,
447
+
"editedOn": null,
448
+
"lastUsedOn": null
449
+
}
450
+
]
451
+
}
452
+
```
453
+
454
+
## `/auth-configs/add`
455
+
456
+
### Request
457
+
458
+
`POST` requests to `/auth-configs/add` will create an authentication configuration for the authentication process. There are some restrictions on the request object.
459
+
460
+
-`purpose`: A-z, 0-9, -, and \_ are the allowed characters. Max length of purpose is 255 characters.
461
+
-`timeToLive`: Positive time span value (hh:mm:ss)
"purpose": "access-secrets-purpose", // identifying string give context to the specific authentication
472
+
"timeToLive": "00:03:00", // timespan the token is valid for
473
+
"userVerificationRequirement": "preferred" // requirement for if the user has to verify they're allowed to use an authenticator
474
+
"performedBy": "user_123" // user identifier to track changes to the configuration
475
+
}
476
+
```
477
+
478
+
### Response
479
+
480
+
If successful, the `/auth-configs/add` endpoint will return an HTTP 201 (Created) [status code](#status-codes).
481
+
If unsuccessful, the `/auth-configs/add` endpoint will return an HTTP 400 (Bad Request) [status code](#status-codes) with a [problem details](errors/#problem-details) body.
482
+
483
+
## `/auth-configs/`
484
+
485
+
### Request
486
+
487
+
`POST` requests to `/auth-configs` will edit an authentication configuration for the authentication process. There are some restrictions on the request object.
488
+
489
+
-`purpose`: Must be an existing purpose (If a new purpose is passed here, a 404 will be returned)
490
+
-`timeToLive`: Positive time span value (hh:mm:ss)
Copy file name to clipboardExpand all lines: src/guide/concepts.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -113,6 +113,12 @@ While WebAuthn is very secure, attestation enhances the security of the WebAuthn
113
113
114
114
The relying party can use the attestation information to make informed decisions about whether to trust the authenticator and to assess the level of security provided by the user's device. It's important to note that while attestation enhances security, it is not mandatory for the basic operation of WebAuthn. WebAuthn can still work without attestation, but its use is recommended for stronger security practices.
115
115
116
+
### Authentication Configurations
117
+
118
+
Authentication configurations allow you to configure your authentication token used in the `signin()` and `stepup()` client methods. Each method passes parameters into the authenticator accessed by the browser. Authentication Configurations allow for the Time to Live of the authentication token and the User Verification Requirement setting to be set for the given authentication workflow.
119
+
120
+
There are two default Authentication Configurations for each application, `step-up` and `sign-in`. They are used in their respective client methods as the `purpose` of the authentication. They can be edited, and if deleted, they will revert back to their default settings. Authentication Configurations can be accessed via the [API](./api.md#auth-configs) or [Admin Console](./admin-console/applications.md#authentication-configurations).
console.log(signinResponse.error); // undefined or a problem details object
165
+
console.error(response.error); // undefined or a problem details object
166
166
```
167
167
168
168
If the signin was successful, the `token` has a string value `"verify_xxyyzz"`. If the sign-in failed, the `error` property contains the [problem details](../errors.md#problem-details).
@@ -193,3 +193,26 @@ Call the static async `.isAutofillSupported()` method to check if the end-user's
193
193
if (awaitPasswordless.isAutofillSupported()) {
194
194
}
195
195
```
196
+
197
+
## .stepup()
198
+
199
+
`.stepup()` works similar to the `.signin()` method except it allows for a specific purpose to be passed through. These purposes are set via the API ([API](../api.md#authentication)/OpenAPI) or through the application's authentication configuration setting in the [Admin Console](../admin-console/applications.md#authentication-configurations).
200
+
201
+
If the authentication was successful, the `token` has a string value `"verify_xxyyzz"`. This token will have a `Purpose` property of `step-up` by default, whatever was passed in through the `StepUpRequest`. If the authentication failed, the `error` property contains the [problem details](../errors.md#problem-details).
202
+
203
+
```js
204
+
conststepUpRequest= {
205
+
signinMethod: {
206
+
userId:123// you could also use alias as the signinMethod as well.
0 commit comments