Conversation
anarchivist
requested changes
Jul 28, 2026
anarchivist
left a comment
Member
There was a problem hiding this comment.
i have some concerns about the approach here. we should not be allowing GET requests against the omniauth calnet provider. we also seem to be diverging from the present approach in the release/1.x branch.
Comment on lines
+2
to
+3
| # Allow GET as well so direct navigation to /users/auth/calnet works. | ||
| OmniAuth.config.allowed_request_methods = %i[get post] |
Member
There was a problem hiding this comment.
i don't think we want or need this initializer. adding support for GET requests causes security concerns, which is why omniauth removed it as a default in version 2.
|
|
||
| devise_for :users, controllers: { omniauth_callbacks: 'omniauth_callbacks' } | ||
| devise_scope :user do | ||
| get 'users/sign_in', to: redirect('/users/auth/calnet'), as: :new_user_session |
Member
There was a problem hiding this comment.
why do we need a users/sign_in route?
Comment on lines
+26
to
+32
| def calnet_logout_url(return_url = root_url) | ||
| host = Devise.omniauth_configs[:calnet].options[:host] | ||
| path = Devise.omniauth_configs[:calnet].options[:logout_url] | ||
| URI::HTTPS.build(host:, path:, query: { | ||
| service: return_url | ||
| }.to_query).to_s | ||
| end |
Member
There was a problem hiding this comment.
why are we adding this method? it's not in the release/1.x branch - how was it being generated before?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix sign-in/sign-out failures after migration: