You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to do have a way to sign_in with different scopes?
I want to do something like this :
signin_path(scope: "toto")
and like this
signin_path(scope:"other_scope")
here is my strategy :
module OmniAuth
module Strategies
class ResaNetwork < OmniAuth::Strategies::OAuth2
DEFAULT_SCOPE = :public
def authorize_params
super.tap do |params|
Rails.logger.debug "THE PARAMS #{request.env['omniauth.params'].inspect}"
end
end
option :name, :resa_network
option :client_options, {
#site: "http://dylog.ubuntu-sylario.net:3000",
site: ENV["CLIENT_OPTION_SITE"],
authorize_path: "/oauth/authorize"
}
uid do
Rails.logger.debug "------ #{raw_info.inspect}--------"
raw_info["resource_owner_id"]
end
info do
{username: raw_info["username"]}
end
def raw_info
@raw_info ||= access_token.get('/api/user').parsed
end
end
end
end
How can I get back the scope params and use it to ask for the token?
The text was updated successfully, but these errors were encountered:
Is it possible to do have a way to sign_in with different scopes?
I want to do something like this :
and like this
here is my strategy :
How can I get back the scope params and use it to ask for the token?
The text was updated successfully, but these errors were encountered: