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

Handle Authentication when user is signing up with google #61

Open
Bluesparx opened this issue Oct 12, 2024 · 2 comments
Open

Handle Authentication when user is signing up with google #61

Bluesparx opened this issue Oct 12, 2024 · 2 comments

Comments

@Bluesparx
Copy link
Owner

Problem

Currently, all protected routes rely on JWT verification for user authentication. It does not handle the scenario where a user signs up or logs in using Google (Firebase). As a result, users authenticated via Google can bypass the JWT verification or face issues accessing protected routes.

Solution:

  • Implement a unified authentication system that supports both JWT-based sessions and Firebase tokens.
@hv-ojha
Copy link

hv-ojha commented Oct 15, 2024

It will be better if we trigger the Google SignIn from backend.
Because that way we will be able to generate new token according to the login type. Also we will have full control over JWT creation as well as adding new data in coming future.

Also after signIn we can token in cookies and header for better authorization and authentication.
You can take a reference from this diagram. We have tried some similar architecture in my past application.

Note: It is just for your reference, we can have customized implementation according to our business case.

Helpful URLs
Google verify token

Google Auth using NodeJS backend

SAML is an authentication not authorization

SSO Architecture

@Bluesparx
Copy link
Owner Author

Yes, that sounds good.

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

No branches or pull requests

2 participants