Add omniauth saml section for sign in and sign up page

Co-authored-by: Anamika Aggarwal <anamikaagg18@gmail.com>
This commit is contained in:
taitus
2022-07-11 13:06:44 +02:00
committed by Javi Martín
parent 9d216084a7
commit a4709f9da0
15 changed files with 181 additions and 2 deletions

View File

@@ -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