Reputation: 112
I'm using the omniauth-google-oauth2
gem.
My oauth2 setup is really similar to the one here: https://gist.github.com/sevos/821291 , meaning that I keep my scopes in a config/authentication_services.yml
file.
I would like to exclude a scope from the initial request, and ask for that scope only at the point when I need it?
Upvotes: 1
Views: 612
Reputation: 416
What you need is probably connected to dynamic scope setting with omniuath. Few reads that might get you closer, they are about facebook oauth, but the general notion is very similar - you need to use omniauths setup hook.
http://www.mikepackdev.com/blog_posts/2-Dynamically-Requesting-Facebook-Permissions-with-OmniAuth
How can I specify the Facebook permissions (aka scope) OmniAuth asks for DYNAMICALLY?
http://www.mikepackdev.com/blog_posts/2-Dynamically-Requesting-Facebook-Permissions-with-OmniAuth\
Upvotes: 0