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

OAuthService(accessToken, idToken, claims) returns null after Google OAUTH2 Authentication is Success. #1462

Open
anand-sakthivel opened this issue Jan 22, 2025 · 0 comments

Comments

@anand-sakthivel
Copy link

anand-sakthivel commented Jan 22, 2025

Describe the bug.
OAuthService(accessToken, idToken, claims) returns null after Google OAUTH2 Authentication is successful. After manual refresh above values are populated.

Stackblitz example
N/A
Followed I Video in YouTube: https://www.youtube.com/watch?v=r4USQN5VnmY
Duration: 31:39

To Reproduce
Steps to reproduce the behavior:

  1. Using Google Identity Provider for authentication.(Created ClientId & redirect uri is HTTP://localhost:4200/fallback)
  2. Following initLoginFlow() & loadDiscoveryDocumentAndTryLogin() login page flow.
  3. I access localhost:4200 to get to the login page. When I click the login button, I can see the Google login page.
  4. After successful login google redirects to HTTP://localhost:4200/fallback
  5. Inside FallbackComponent(mapped /fallback path to FallbackComponent), I'm getting some log details like (OAuthService(accessToken, idToken, claims)), and it's null, But when I log sessionStorage the above value is not null(Proper login values like access token, id token claims, etc..).
  6. After manually refreshing the page HTTP://localhost:4200/fallback , I can see the log details with value OAuthService(accessToken, idToken, claims).

Expected behavior
What I expect is, After successful login in the redirect page without refreshing the page I should see the OAuthService values.

Desktop (please complete the following information):

  • OS: [Windows ]
  • Browser [chrome]
  • Version [Version 131.0.6778.266 (Official Build) (64-bit)]

Additional context
Add any other context about the problem here.

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

1 participant