-
-
Notifications
You must be signed in to change notification settings - Fork 964
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
fix: implement offline scope in the way google expects #3088
Conversation
linked issue |
Codecov Report
@@ Coverage Diff @@
## master #3088 +/- ##
==========================================
+ Coverage 77.41% 77.46% +0.05%
==========================================
Files 315 315
Lines 19812 19835 +23
==========================================
+ Hits 15337 15365 +28
+ Misses 3289 3283 -6
- Partials 1186 1187 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
indeed it should be the inverse
I'll fix it
…On Fri, Feb 10, 2023 at 2:14 PM hackerman ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In selfservice/strategy/oidc/provider_google.go
<#3088 (comment)>:
> + if !stringslice.Has(scope, gooidc.ScopeOfflineAccess) {
+ options = append(options, oauth2.AccessTypeOffline)
+ }
Not sure if I understand this - if the scope is not "offline_access", we
automatically add it? Is that really what we want?
—
Reply to this email directly, view it on GitHub
<#3088 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCUPI4Z4ZA56Z6RD26KVVDWWY5MTANCNFSM6AAAAAAUWUJ7T4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you for your contribution! This looks pretty good and I have some ideas how to improve it further :)
Maybe you can add a small test that shows that the offline access thing is correctly configured when the scope is set? :) |
Thank you for making Ory better :) |
Hello @tsearle |
google doesn't implements offline access as a scope but instead as a special uri parameter
this PR adapts the code such that if the offline_access scope is requested, it gets transformed into the parameter
access_type=offline