Please sign in to comment.
Refactor request_phase method.
The request params are already accessible in request.params so there is no need to get them from the session (which is set after the request by omniauth). https://github.com/intridea/omniauth/blob/deea8f23642734217fc8a91cfe9a09a69595d638/lib/omniauth/strategy.rb#L200 There is also no need to conditionally initialize options[:authorize_params] and options[:request_params] as these are already set automatically by omniauth-oauth. https://github.com/intridea/omniauth-oauth/blob/43008e42b257d9b7c0b98122cf03ce14b021d782/lib/omniauth/strategies/oauth.rb#L16 This refactor will make it really easy to add new params in the future.
- Loading branch information...
Showing with 13 additions and 16 deletions.