teamhanko / hanko

Authentication and user management system optimized for passkeys

Home Page:https://hanko.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Session cookie not set on localhost on safari

FreddyDevelop opened this issue · comments

Checklist

  • I could not find a solution in the existing issues or docs.
  • I agree to follow this project's Code of Conduct.

Describe the bug

When the hanko API is accessed through a secure connection (https) and you are developing (your app) on localhost and try to test on safari you can not log in. This is because the hanko-frontend-sdk is setting the secure flag when the hanko API is running on https (see here).

We should also check if the app (which integrates hanko) is running on https and when not, we should not set the secure flag for the session cookie.

Reproducing the bug

  1. Create a project at Hanko Cloud
  2. Download one of our starter projects (e.g. https://github.com/teamhanko/hanko-react-express-starter) or use one of the examples in this repo
  3. Configure the example or starter project to use the Hanko Cloud project
  4. Start the App
  5. try to register or login on safari

Logs

No response

Configuration

No response

Hanko Version

v0.9.1

OS Hanko Backend

None

OS Version Hanko Backend

No response

OS

macOS

OS Version

No response

Browser Version

Safari (all versions)

Environment

None

Additional Context

No response