mirror of
https://github.com/hanzoai/openid-client.git
synced 2026-09-24 17:01:10 +00:00
26 lines
837 B
Diff
26 lines
837 B
Diff
diff --git a/examples/oauth.ts b/examples/jar.ts
|
|
index dde3bbc..2a3f17c 100644
|
|
--- a/examples/oauth.ts
|
|
+++ b/examples/jar.ts
|
|
@@ -6,6 +6,7 @@ let getCurrentUrl!: (...args: any) => URL
|
|
let server!: URL // Authorization server's Issuer Identifier URL
|
|
let clientId!: string
|
|
let clientSecret!: string
|
|
+let clientPrivateKey!: client.CryptoKey | client.PrivateKey
|
|
/**
|
|
* Value used in the authorization request as redirect_uri pre-registered at the
|
|
* Authorization Server.
|
|
@@ -47,7 +48,11 @@ let state!: string
|
|
parameters.state = state
|
|
}
|
|
|
|
- let redirectTo = client.buildAuthorizationUrl(config, parameters)
|
|
+ let redirectTo = await client.buildAuthorizationUrlWithJAR(
|
|
+ config,
|
|
+ parameters,
|
|
+ clientPrivateKey,
|
|
+ )
|
|
|
|
console.log('redirecting to', redirectTo.href)
|
|
// now redirect the user to redirectTo.href
|