lib/omniauth/strategies/identitas.rb in omniauth-identitas-0.2.0 vs lib/omniauth/strategies/identitas.rb in omniauth-identitas-0.2.1
- old
+ new
@@ -20,18 +20,33 @@
last_name: raw_info["last_name"],
name: [raw_info["first_name"], raw_info["last_name"]].join(" ")
}
end
+ extra do
+ {
+ m: request.params["m"]
+ }
+ end
+
def raw_info
@raw_info ||= access_token.get('/v1/me.json').parsed
rescue ::Errno::ETIMEDOUT
raise ::Timeout::Error
end
- # https://github.com/intridea/omniauth-oauth2/issues/81
+ # # https://github.com/intridea/omniauth-oauth2/issues/81
def callback_url
- full_host + script_name + callback_path
+ full_host + script_name + callback_path + check_if_mobile
end
+
+ def check_if_mobile
+ "?" + {m: options.authorize_params[:m]}.to_query
+ end
+
+ def setup_phase
+ options.authorize_params[:m] = request.params["m"]
+ end
+
end
end
end
\ No newline at end of file