Add omniauth saml section for sign in and sign up page
Co-authored-by: Anamika Aggarwal <anamikaagg18@gmail.com>
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
skip_before_action :verify_authenticity_token, only: :saml
|
||||
|
||||
def twitter
|
||||
sign_in_with :twitter_login, :twitter
|
||||
end
|
||||
@@ -15,6 +17,10 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
sign_in_with :wordpress_login, :wordpress_oauth2
|
||||
end
|
||||
|
||||
def saml
|
||||
sign_in_with :saml_login, :saml
|
||||
end
|
||||
|
||||
def after_sign_in_path_for(resource)
|
||||
if resource.registering_with_oauth
|
||||
finish_signup_path
|
||||
|
||||
Reference in New Issue
Block a user