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

connectors: implement refreshing with Google #863

Closed
ericchiang opened this issue Mar 17, 2017 · 4 comments · Fixed by #1180
Closed

connectors: implement refreshing with Google #863

ericchiang opened this issue Mar 17, 2017 · 4 comments · Fixed by #1180

Comments

@ericchiang
Copy link
Contributor

When a user log in through dex into Google, dex should be able to refresh the user's info with Google when client of dex refreshes it's id_token.

This is complicated because Google only allows a single refresh token out per client <-> end user pair, so we'd have to store connector data in our "offlinesessions" object globally, instead of in the refresh data like we do now.

Also is this general enough to do for all oidc providers, or just Google? Investigate.

@mwitkow
Copy link

mwitkow commented Mar 22, 2017

This is very likely to be applicable to other OIDC providers, as most of them allow users to "delete Tokens granted to Applications", signifying that only one is issued.

@ericchiang
Copy link
Contributor Author

FYI I brain dumped a lot of my thoughts about this here: https://docs.google.com/document/d/14XaHtY_JDU_fT1CfhFHewKvosPCbmyf8fD4S5UnsG2o/edit?usp=sharing

It's a long doc, but hopefully articulates the refactors that need to happen to support this feature.

@srenatus
Copy link
Contributor

We could create a copy of the current oidc connector named google, which does not support Refresh(), and expand the oidc connector to do support refresh_tokens and groups, I suppose? 🤔 @ericchiang what do you think? This could unblock #1065 without solving the google-specific issue...

@ericchiang
Copy link
Contributor Author

I think we still have the issue that providers can return refresh tokens that invalidate previously requested tokens. Right now the connector data is per user / Dex client pair. So if a user logs in to client A then client B, the refresh token dex gets for client B could invalidate the upstream refresh token dex got for client A.

Making that data global to the user, so client A and client B actually use the same upstream refresh token from the provider is probably still a requirement.

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

Successfully merging a pull request may close this issue.

3 participants