-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
jarm.diff
21 lines (19 loc) · 900 Bytes
/
jarm.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/examples/oauth.ts b/examples/jarm.ts
index d55e62d..f2ad78a 100644
--- a/examples/oauth.ts
+++ b/examples/jarm.ts
@@ -44,6 +44,7 @@ let state: string | undefined
authorizationUrl.searchParams.set('scope', 'api:read')
authorizationUrl.searchParams.set('code_challenge', code_challenge)
authorizationUrl.searchParams.set('code_challenge_method', code_challenge_method)
+ authorizationUrl.searchParams.set('response_mode', 'jwt')
/**
* We cannot be sure the AS supports PKCE so we're going to use state too. Use of PKCE is
@@ -62,7 +63,7 @@ let state: string | undefined
let access_token: string
{
const currentUrl: URL = getCurrentUrl()
- const params = oauth.validateAuthResponse(as, client, currentUrl, state)
+ const params = await oauth.validateJwtAuthResponse(as, client, currentUrl)
const response = await oauth.authorizationCodeGrantRequest(
as,