Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oauth doesn't work in safari #17

Open
knotbin opened this issue Oct 6, 2024 · 2 comments
Open

oauth doesn't work in safari #17

knotbin opened this issue Oct 6, 2024 · 2 comments

Comments

@knotbin
Copy link

knotbin commented Oct 6, 2024

I thought I had broken something because every time I would log in, it would just redirect me to the logged out page, but I realized it just didn't work in Safari and worked fine in chrome. I assume this is something wrong/incompatible in the storage part of oauth.

@haileyok
Copy link

haileyok commented Oct 7, 2024

Hey! Quick question, are you using lockdown mode?

@bhbs
Copy link

bhbs commented Oct 13, 2024

Hello,

It seems that this issue is related to vvo/iron-session#587.

As a possible solution, you can either host your application over HTTPS or set secure: false in your configuration.

I confirmed that by modifying

const session = await getIronSession<Session>(req, res, {
cookieName: 'sid',
password: env.COOKIE_SECRET,
})
to:

const clientSession = await getIronSession<Session>(req, res, {
  cookieName: "sid",
  password: env.COOKIE_SECRET,
  cookieOptions: { secure: false },
});

it works in Safari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants