Skip to content

Commit

Permalink
Fix same site policy
Browse files Browse the repository at this point in the history
  • Loading branch information
sylveon committed Feb 27, 2022
1 parent 7cfd116 commit 6af6950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion func/oauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function handler(event, context) {
statusCode: 303,
headers: {
"Location": `https://discord.com/api/oauth2/authorize?client_id=${encodeURIComponent(process.env.DISCORD_CLIENT_ID)}&redirect_uri=${encodeURIComponent(redirectUri)}&response_type=code&scope=identify&prompt=none&state=${state}`,
"Set-Cookie": `__Secure-CSRFState=${state}; Domain=${DEPLOY_PRIME_URL.replace("https://", "")}; Path=/.netlify/functions/oauth-callback; Secure; HttpOnly; SameSite=Strict`
"Set-Cookie": `__Secure-CSRFState=${state}; Domain=${DEPLOY_PRIME_URL.replace("https://", "")}; Path=/.netlify/functions/oauth-callback; Secure; HttpOnly; SameSite=Lax`
}
};
}

0 comments on commit 6af6950

Please sign in to comment.