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

Add a non-cookie session manager for different domains usecase. #9

Open
NamesMT opened this issue Jun 8, 2024 · 1 comment
Open
Labels
help wanted Extra attention is needed

Comments

@NamesMT
Copy link
Owner

NamesMT commented Jun 8, 2024

Currently our session manager & authentication flow uses an automatic user detection based on session cookies with hono-sessions, this allows a super great DX working with APIs from the backend.

But chrome is phasing out 3rd-party cookies, we need to add another session manager to support usecases where we use different domains for the frontend and backend, maybe a Bearer JWT that contains the session id? Where would we store the session data?

@NamesMT NamesMT added the help wanted Extra attention is needed label Jun 8, 2024
@NamesMT NamesMT changed the title Refactoring the authentication flow before 2025 Refactoring the authentication flow? Jun 8, 2024
@NamesMT NamesMT changed the title Refactoring the authentication flow? Add another session manager that doesn't depends on cookies Jun 8, 2024
@NamesMT NamesMT changed the title Add another session manager that doesn't depends on cookies Add a non-cookie session manager for different domains usecase. Jun 8, 2024
@NamesMT
Copy link
Owner Author

NamesMT commented Jun 10, 2024

I think I've implemented a very good base for a header-based session manager, it's still not fully finished though, you can see it and give your idea here:
https://github.com/NamesMT/starter-fullstack/blob/main/apps/backend/src/middlewares/session.ts#L49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant