lib/omniauth/strategies/auth0.rb in omniauth-auth0-1.2.0 vs lib/omniauth/strategies/auth0.rb in omniauth-auth0-1.3.0
- old
+ new
@@ -15,10 +15,12 @@
args [:client_id, :client_secret, :namespace, :provider_ignores_state, :connection]
def initialize(app, *args, &block)
super
+ fail(ArgumentError.new("Received wrong number of arguments. #{args.inspect}")) if @options[:namespace].nil?
+
@options.provider_ignores_state = args[3] unless args[3].nil?
@options.connection = args[4] unless args[4].nil?
@options.client_options.site = "https://#{options[:namespace]}"
@options.client_options.authorize_url = "https://#{options[:namespace]}/authorize"
@@ -37,11 +39,9 @@
end
end
credentials do
hash = {'token' => access_token.token}
- # hash.merge!('refresh_token' => access_token.refresh_token) if access_token.expires? && access_token.refresh_token
- # hash.merge!('expires_at' => access_token.expires_at) if access_token.expires?
hash.merge!('expires' => true)
if access_token.params
hash.merge!('id_token' => access_token.params['id_token'])
hash.merge!('token_type' => access_token.params['token_type'])
end
\ No newline at end of file