Skip to content

Commit 4036242

Browse files
committed
docs: update implicitAuthentication and useIdTokenResponseType
1 parent 5c80729 commit 4036242

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

docs/functions/implicitAuthentication.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,16 @@ In a browser environment
7272

7373
```ts
7474
let config!: client.Configuration
75-
let getCodeVerifierFromSession!: (...args: any) => string
75+
let expectedNonce!: string
7676
let getCurrentUrl!: (...args: any) => URL
7777

78-
let tokens = await client.authorizationCodeGrant(
78+
let tokens = await client.implicitAuthentication(
7979
config,
8080
new URL(location.href),
81-
{
82-
pkceCodeVerifier: getCodeVerifierFromSession(),
83-
},
81+
expectedNonce,
8482
)
8583
```
84+
85+
## See
86+
87+
[OpenID Connect 1.0 Implicit Flow](https://openid.net/specs/openid-connect-core-1_0-errata2.html#ImplicitFlowAuth)

docs/functions/useIdTokenResponseType.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ client.useIdTokenResponseType(config)
5959

6060
## See
6161

62-
[OpenID Connect 1.0 Hybrid Flow](https://openid.net/specs/openid-connect-core-1_0-errata2.html#HybridFlowAuth)
62+
[OpenID Connect 1.0 Implicit Flow](https://openid.net/specs/openid-connect-core-1_0-errata2.html#ImplicitFlowAuth)

src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2829,15 +2829,13 @@ export interface ImplicitAuthenticationResponseChecks
28292829
*
28302830
* ```ts
28312831
* let config!: client.Configuration
2832-
* let getCodeVerifierFromSession!: (...args: any) => string
2832+
* let expectedNonce!: string
28332833
* let getCurrentUrl!: (...args: any) => URL
28342834
*
2835-
* let tokens = await client.authorizationCodeGrant(
2835+
* let tokens = await client.implicitAuthentication(
28362836
* config,
28372837
* new URL(location.href),
2838-
* {
2839-
* pkceCodeVerifier: getCodeVerifierFromSession(),
2840-
* },
2838+
* expectedNonce,
28412839
* )
28422840
* ```
28432841
*
@@ -2852,6 +2850,8 @@ export interface ImplicitAuthenticationResponseChecks
28522850
* @returns ID Token Claims Set
28532851
*
28542852
* @group OpenID Connect 1.0
2853+
*
2854+
* @see {@link https://openid.net/specs/openid-connect-core-1_0-errata2.html#ImplicitFlowAuth OpenID Connect 1.0 Implicit Flow}
28552855
*/
28562856
export async function implicitAuthentication(
28572857
config: Configuration,
@@ -3077,7 +3077,7 @@ export function useCodeIdTokenResponseType(config: Configuration) {
30773077
*
30783078
* @group Advanced Configuration
30793079
*
3080-
* @see {@link https://openid.net/specs/openid-connect-core-1_0-errata2.html#HybridFlowAuth OpenID Connect 1.0 Hybrid Flow}
3080+
* @see {@link https://openid.net/specs/openid-connect-core-1_0-errata2.html#ImplicitFlowAuth OpenID Connect 1.0 Implicit Flow}
30813081
*/
30823082
export function useIdTokenResponseType(config: Configuration) {
30833083
checkConfig(config)

0 commit comments

Comments
 (0)