Repository navigation
How to Integrate KeyCloak and Google Login Properly. #37485
Unanswered
dotsinspace
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Before reporting an issue
Area
authentication
Describe the bug
I am so sorry if this question sounds stupid. But i have wasted 3 days already and can't ignore this as it has become challange to get it working. so following is what i am trying to do.
Current Flow.
User request Auth URL from Server -> When user click on my web app login icon on google then new tab opens up with authorization -> google respond back with code to get access token.
Now i am totally blank how can i get keycloak to use that access token to get user.
I have tried another flow as well which as follows.
I built up google login which was basically login url which keycloak generates when clicked on the google login icon on keycloak ui. Now issue with this approch is that it generates state to avoid Cross Request forgery. now with that said i can't just use url straight way.
NOTE: I can't use key cloak ui have to use my app ui.
even i can't setup token exchange which though might work as my keycloak ui is missing permission tab i have attached the screenshot below.
Version
latest
Regression
Expected behavior
I want to use KeyCloak for my because my app already have alot of SSO and KeyCloak is Perfect fit for it. but without its UI i can only use golang SDK.
Actual behavior
How to Reproduce?
Anything else?
I am using gocloak "github.com/Nerzal/gocloak/v13" sdk as of now. current function which handles this looks like following.
I am editing my question with one more thing which is as follows.
when i run above url it responds back with following url which is basically redirects to my app.
Now in first place i was expecting the consent 2nd why has KeyCloak responded back with token
is it Okay (it contains admin username) ? because decoding the token i found out following.
All reactions