@oauth-spa-kit/server 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/handlers.js +4 -1
- package/package.json +2 -2
package/dist/handlers.js
CHANGED
|
@@ -57,7 +57,7 @@ export function createLoginHandler(config) {
|
|
|
57
57
|
parEndpoint: discovery.pushed_authorization_request_endpoint,
|
|
58
58
|
clientId: config.oauth.clientId,
|
|
59
59
|
clientAuthentication: config.oauth.clientAuthentication,
|
|
60
|
-
assertionAudience: discovery.
|
|
60
|
+
assertionAudience: discovery.issuer,
|
|
61
61
|
params: authParams,
|
|
62
62
|
fetchImpl: config.fetchImpl,
|
|
63
63
|
});
|
|
@@ -105,6 +105,7 @@ export function createCallbackHandler(config) {
|
|
|
105
105
|
const tokens = await exchangeAuthorizationCode({
|
|
106
106
|
config: config.oauth,
|
|
107
107
|
tokenEndpoint: discovery.token_endpoint,
|
|
108
|
+
assertionAudience: discovery.issuer,
|
|
108
109
|
code,
|
|
109
110
|
codeVerifier: pkce.codeVerifier,
|
|
110
111
|
dpopKeyPair,
|
|
@@ -152,6 +153,7 @@ export function createSessionHandler(config) {
|
|
|
152
153
|
session.tokens = await exchangeRefreshToken({
|
|
153
154
|
config: config.oauth,
|
|
154
155
|
tokenEndpoint: discovery.token_endpoint,
|
|
156
|
+
assertionAudience: discovery.issuer,
|
|
155
157
|
refreshToken: session.tokens.refreshToken,
|
|
156
158
|
dpopKeyPair,
|
|
157
159
|
fetchImpl: config.fetchImpl,
|
|
@@ -209,6 +211,7 @@ export async function getAuthorizationHeader(request, config) {
|
|
|
209
211
|
session.tokens = await exchangeRefreshToken({
|
|
210
212
|
config: config.oauth,
|
|
211
213
|
tokenEndpoint: discovery.token_endpoint,
|
|
214
|
+
assertionAudience: discovery.issuer,
|
|
212
215
|
refreshToken: session.tokens.refreshToken,
|
|
213
216
|
dpopKeyPair,
|
|
214
217
|
fetchImpl: config.fetchImpl,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oauth-spa-kit/server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "BFF-pattern OAuth handlers: sealed HttpOnly-cookie sessions + login/callback/refresh/logout route factories, built on Web-standard Request/Response so they drop into Nitro, Next.js route handlers, Cloudflare Workers, or plain Node (via a small adapter).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"node": ">=18"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@oauth-spa-kit/core": "
|
|
25
|
+
"@oauth-spa-kit/core": "2.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "^5.6.0",
|