-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add a login with Google Authorization Server Sample #106
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
Comments
There should probably be two different where the user can choose between them at login, for example Google and Github. If you host a SAAS solution, it is quite useful to delegate authentication to each customer organisations own OIDC provider. |
I was thinking about this, should the authorization server ever delegate authorization? I understand the authorization server would delegate the storage of users / credentials to LDAP or a DB but I thought that the process of authorizing a client should be performed by the authorization server. The existing Spring resource server already works with the various social logins. |
There are a number of OAuth/OIDC providers that deliver this type of feature via Social login authorization delegation. This is typically delivered in a product, so it's not clear if we would deliver such support within the framework. Either way, it will be a good exercise to deliver a sample that demonstrates this authorization delegation pattern. |
I tried something for this:
Would this be right for the sample? Would be glad to submit a PR for this if necessary |
@pangyiwei The sample you created does not integrate Authorization Server. It simply uses client features only. We would need the authorization related data to be stored via |
@jgrandja Ahh I see. I had the impression that this could be done similarly to how the sample was for the form login where the resource owner will have to be authenticated (by Google) first before the authorization is saved by Thank you for the clarification. |
Any progress/timeline on this issue? |
@jgrandja it definitely works as of 0.2.0 https://github.com/gw2auth/oauth2-server/blob/main/src/main/java/com/gw2auth/oauth2/server/configuration/SecurityConfiguration.java |
Thanks for looking into this @fwollsch. I suspected it would work, however, there is another implementation strategy that could provide tighter integration with SpringAS. I'll be looking into this soon. |
Hello @jgrandja, thanks for looking into this. I'm looking for a sample SpringAS project that does federated authentication using external identity providers. Could you please share any progress? |
@schepuri-bisc I haven't started it yet but it's planned for the |
This sample is now in main via 3fe6f86 |
hi |
Sorry @imaxkhan, I'm sure you can use AD but I don't know that information off-hand. You will want to check the documentation for your provider. It should be fairly similar to the sample. |
hi in this example u are adding custom claims to ID_TOKEN |
yes as u said its working now..tnx |
@imaxkhan feel free to submit any questions you have to Stack Overflow and we can take a look. We prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it). Having said that,
In
You can simply do:
|
just add same thing before like this:
but we can not change attributes in access token because it is unmodifiable I just one to add some custom claims to access token and in resource sever with custom token convertor access to this claim..but ur example only deals with ID_TOKEN now i change it like this: but in resource server again claims in access token not being changed..even my custom claims |
@imaxkhan, this is covered in the How-to guides in the reference and in the Federated Identity Sample. If you have further questions, please use Stack Overflow. |
The current sample authorization server uses spring security form login. A sample showing how to have the authorization server delegate to google or another social login provider is quite useful. For my use case I to be able to support from based login and social OIDC logins. Implementing this sample can help ensure that the configuration APIs are flexible enough to allow multiple authentication providers.
The text was updated successfully, but these errors were encountered: