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,