Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow other host for oauth response redirect #19

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

ashleyHutton
Copy link
Member

Closes #18

@@ -18,7 +18,7 @@ def create
oauth_response.code = authorization.code
oauth_response.redirect_uri = @redirect_uri
oauth_response.approve!
redirect_to oauth_response.location
redirect_to oauth_response.location, allow_other_host: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just chiming in to say that while this option only got supported in Rails 7, it looks like it should just be a no-op as far back as Rails 5.

https://github.com/rails/rails/blob/v5.0.0/actionpack/lib/action_controller/metal/redirecting.rb#L61

(The second option would be passed in as the response status which is only looking for a specific status key in Rails 5 and 6)

@ashleyHutton ashleyHutton merged commit a779791 into master Feb 12, 2024
@ashleyHutton ashleyHutton deleted the ashleyHutton/issue18 branch February 12, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ActionController::Redirecting::UnsafeRedirect
2 participants