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: docs/specs/oidc.md
+72Lines changed: 72 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@
17
17
+[acr_values](#acr_values)
18
18
+[code_challenge_method](#code_challenge_method)
19
19
+[nonce](#nonce)
20
+
+[x_settings_action](#x_settings_action)
20
21
*[Token Request](#token-request)
21
22
+[grant_type](#grant_type)
22
23
+[id_token_hint](#id_token_hint-1)
@@ -62,6 +63,7 @@
62
63
+[Consent Screen](#consent-screen)
63
64
+[Authorized Apps page](#authorized-apps-page)
64
65
+[App Session Token](#app-session-token)
66
+
+[Settings Action](#settings-action)
65
67
*[How to construct authentication request to achieve different scenarios](#how-to-construct-authentication-request-to-achieve-different-scenarios)
66
68
+[The user has NOT signed in yet in my mobile app. I want to authenticate any user.](#the-user-has-not-signed-in-yet-in-my-mobile-app-i-want-to-authenticate-any-user)
67
69
+[The user has NOT signed in yet in my mobile app. I want to authenticate any user. Possibly reuse any previous signed in sessions.](#the-user-has-not-signed-in-yet-in-my-mobile-app-i-want-to-authenticate-any-user-possibly-reuse-any-previous-signed-in-sessions)
@@ -219,6 +221,12 @@ Only `S256` is supported. `plain` is not supported.
219
221
220
222
To mitigate replay attacks, provide a `nonce` in the authentication request. Authgear will include the `nonce` Claim in the ID Token, and the client must verify that the `nonce` claim value is equal to the value of the `nonce` parameter sent in the authentication request. The `nonce` is recommended but it is optional. The `nonce` value is a case sensitive string. Reference: [Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3.1.2.1).
221
223
224
+
### x_settings_action
225
+
226
+
When it is specified, the user will be redirected to the corresponding auth ui pages of the settings action. After completing the action, the user will be redirected back to the app through redirect URI.
227
+
228
+
Supported values: `change_password`.
229
+
222
230
## Token Request
223
231
224
232
### grant_type
@@ -229,11 +237,14 @@ To mitigate replay attacks, provide a `nonce` in the authentication request. Aut
`urn:authgear:params:oauth:grant-type:anonymous-request`is for authenticating and issuing tokens directly for anonymous user.
234
243
235
244
`urn:authgear:params:oauth:grant-type:biometric-request`is for authenticating and issuing tokens directly for users with Biometric identity.
236
245
246
+
`urn:authgear:params:oauth:grant-type:settings-action`is issued upon completion of a settings action, such as change password.
247
+
237
248
### id_token_hint
238
249
239
250
When the grant type is `urn:authgear:params:oauth:grant-type:id-token`, the request must include `id_token_hint`.
@@ -631,6 +642,67 @@ When the app session token is consumed:
631
642
instead of IdP sessions. Therefore, the lifetime of session cookie is bound
632
643
to refresh token instead of IdP session.
633
644
645
+
### Settings Action
646
+
647
+
For first-party clients, user may want to perform specific account settings action (e.g. verify email) in the app.
648
+
649
+
Settings action will be started via authorization endpoint. Authentication is needed for performing settings action. Both IdP session or App session are accepted. If the login hint (app session token) is provided in the authorization endpoint, the app session cookie will be set when redirecting to the settings action ui. If the login hint is not provided, user will be redirected to the settings action ui directly and the IdP session will be used.
650
+
651
+
The redirect URI of the settings action should be registered in client settings `redirect_uris`.
652
+
653
+
After redirecting back to the app, An code of grant type `urn:ietf:params:oauth:grant-type:settings-action` will be returned to the app. The app can exchange the code to prove the completion of the settings action.
654
+
655
+
The following flow charts show how the settings actions work.
Allow the user performs specific settings action from the app. e.g. change password. The action is only resolved when the user has completed the action.
278
+
279
+
```typescript
280
+
// In mobile sdk
281
+
interfaceChangePasswordOptions {
282
+
redirectURI:string;
283
+
uiLocales?:string[];
284
+
colorScheme?:ColorScheme;
285
+
}
286
+
287
+
function changePassword(options:ChangePasswordOptions):Promise<Void>;
288
+
289
+
// In web sdk
290
+
interfaceChangePasswordOptions {
291
+
redirectURI:string;
292
+
uiLocales?:string[];
293
+
colorScheme?:ColorScheme;
294
+
}
295
+
296
+
function startChangingPassword(options:ChangePasswordOptions):Promise<Void>;
0 commit comments