-
Notifications
You must be signed in to change notification settings - Fork 0
Ap 751:Update login link #95
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| class SessionsController < ApplicationController | ||
|
|
||
| def destroy | ||
| sign_out current_user if signed_in? | ||
| sign_out current_user if user_signed_in? | ||
| redirect_to calnet_logout_url, allow_other_host: true | ||
| end | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # OmniAuth request phase defaults to POST in newer versions. | ||
| # Allow GET as well so direct navigation to /users/auth/calnet works. | ||
| OmniAuth.config.allowed_request_methods = %i[get post] | ||
|
Comment on lines
+2
to
+3
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i don't think we want or need this initializer. adding support for |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,10 @@ | |
| end | ||
|
|
||
| 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need a |
||
| get 'users/sign_out', to: 'sessions#destroy', as: :destroy_user_session | ||
| end | ||
|
|
||
| concern :exportable, Blacklight::Routes::Exportable.new | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we adding this method? it's not in the
release/1.xbranch - how was it being generated before?