Plugin API - Cookie Not Setting

Hello, I am having an issue where the cookie for OAuth2 authentication is not setting in the browser, this is in a production environment. Here is my config:
{
listenOptions: { port: 1565 },
auth: {
id: '1109280195862605964',
secret: 'REDACTED',
scopes: [ 'identify' ],
cookie: 'REVELATIONS_AUTH',
redirect: 'https://revelations.gg/oauth/authorize',
domainOverwrite: '.revelations.gg'
},
prefix: '/',
origin: 'https://revelations.gg'
}
{
listenOptions: { port: 1565 },
auth: {
id: '1109280195862605964',
secret: 'REDACTED',
scopes: [ 'identify' ],
cookie: 'REVELATIONS_AUTH',
redirect: 'https://revelations.gg/oauth/authorize',
domainOverwrite: '.revelations.gg'
},
prefix: '/',
origin: 'https://revelations.gg'
}
I have also set NODE_ENV="production" in my .env file to ensure the Secure cookie. Upon making a request to https://api.revelations.gg/oauth/callback, I can see a Set-Cookie header is indeed returned but it's not setting in the browser.
1 Reply
b1nzee
b1nzee2y ago
Nevermind, I have resolved this issue myself For anybody else who may have a similar issue, make sure to do credentials: "include" in your frontend when making a request to /oauth/callback in your API
Want results from more Discord servers?
Add your server