diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 89f68329..47f4ebc9 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -41,7 +41,7 @@ services: NEXTAUTH_SECRET: ${NEXTAUTH_SECRET} USER_SETTINGS_JWT_SECRET: ${USER_SETTINGS_JWT_SECRET} TURNSTILE_SECRET: ${TURNSTILE_SECRET} - NEXT_PUBLIC_TURNSTILE_SITEKEY: ${NEXT_PUBLIC_TURNSTILE_SITEKEY} + NEXT_PUBLIC_TURNSTILE_SITEKEY: 0x4AAAAAAA11o5rNvbUuAWSJ STRAPI_API_URL: ${STRAPI_API_URL} STRAPI_API_TOKEN: ${STRAPI_API_TOKEN} diff --git a/server/utils/auth.ts b/server/utils/auth.ts index 0e5aafdd..41992512 100644 --- a/server/utils/auth.ts +++ b/server/utils/auth.ts @@ -23,13 +23,15 @@ export async function refreshToken(token: JWT): Promise { ) if (!response.ok) { + console.log(response) + console.log(await response.json()) throw new Error(`Error: ${response.statusText}`) } const newToken = await response.json() const jwtPayload: KeycloakJwtPayload = jwtDecode(newToken.access_token) - + console.log(newToken) return { sub: jwtPayload.sub, email: jwtPayload.email, @@ -38,6 +40,7 @@ export async function refreshToken(token: JWT): Promise { refreshToken: newToken.refresh_token, } } catch (error) { + console.log('not refreshing access token, error', error) return { ...token, error: 'RefreshAccessTokenError' } } }