From 6f967720adbfe8fa8821d51265b4089dd75fb6e1 Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Mon, 18 Mar 2024 03:47:39 +0100 Subject: [PATCH] WIP: OAuth authn --- pages/api/auth/[...nextauth].ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/api/auth/[...nextauth].ts b/pages/api/auth/[...nextauth].ts index 15458c5..df09a03 100644 --- a/pages/api/auth/[...nextauth].ts +++ b/pages/api/auth/[...nextauth].ts @@ -9,17 +9,17 @@ async function refreshAccessToken (token: any) { try { const url = issuer + '/protocol/openid-connect/token' const params = new URLSearchParams({ - client_id: clientId, - client_secret: clientSecret, - grant_type: 'refresh_token', - refresh_token: token.refreshToken - }).toString() + client_id: clientId, + client_secret: clientSecret, + grant_type: 'refresh_token', + refresh_token: token.refreshToken + }).toString() const response = await fetch(url, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - method: 'POST' + method: 'POST', body: params }) -- GitLab