diff --git a/.env.local.example b/.env.local.example
index ac5d307eaaa5971ee959c465a0bde68933cea5bf..04412a44835f1f41672ee7f07fb41fd4f0df96f1 100644
--- a/.env.local.example
+++ b/.env.local.example
@@ -17,6 +17,7 @@ NEXTAUTH_CLIENT_SECRET="YOUR_OIDC_CLIENT_SECRET"
 NEXTAUTH_SECRET="SOhxHLn53mV7ML7y8L6rL5oOQxOVb0V4p2Ez0ZSIuOs=" # openssl rand -base64 32
 NEXTAUTH_ISSUER="https://proxy.aai.geant.org"
 NEXTAUTH_WELL_KNOWN_OVERRIDE="https://proxy.aai.geant.org/.well-known/openid-configuration"
+NEXTAUTH_TOKEN_ENDPOINT="https://proxy.aai.geant.org/OIDC/token"
 
 # docker-compose variables
 # KEYCLOAK_ADMIN=admin
diff --git a/pages/api/auth/[...nextauth].ts b/pages/api/auth/[...nextauth].ts
index 2a5307254390aa40525302ef0a9fa92cbeb5933a..7fd5f35caf23418c716c51790f6415595060ee1a 100644
--- a/pages/api/auth/[...nextauth].ts
+++ b/pages/api/auth/[...nextauth].ts
@@ -21,7 +21,7 @@ async function refreshAccessToken(token: JWT): Promise<JWT> {
       refresh_token: token.refreshToken as string,
     });
 
-    const response = await fetch(process.env.TOKEN_ENDPOINT!, {
+    const response = await fetch(process.env.NEXTAUTH_TOKEN_ENDPOINT!, {
       method: 'POST',
       headers: {
         'Content-Type': 'application/json',