Amazon SSO added
This commit is contained in:
parent
2a7491edcd
commit
65723d3063
7 changed files with 25 additions and 3 deletions
|
|
@ -15,6 +15,10 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|||
login_via 'Google'
|
||||
end
|
||||
|
||||
def amazon
|
||||
login_via 'Amazon'
|
||||
end
|
||||
|
||||
def login_via(provider_name)
|
||||
# You need to implement the method below in your model (e.g. app/models/user.rb)
|
||||
@user = User.from_omniauth(request.env["omniauth.auth"])
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ class User < ApplicationRecord
|
|||
:omniauthable, :omniauth_providers => [
|
||||
:launchpad,
|
||||
:stackexchange,
|
||||
:google_oauth2
|
||||
:google_oauth2,
|
||||
:amazon
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
= link_to "Sign in with Launchpad", user_launchpad_omniauth_authorize_path
|
||||
= link_to "Sign in with StackExchange", user_stackexchange_omniauth_authorize_path
|
||||
= link_to "Sign in with Google", user_google_oauth2_omniauth_authorize_path
|
||||
= link_to "Sign in with Amazon", user_amazon_omniauth_authorize_path
|
||||
|
||||
/ div
|
||||
/ = link_to image_tag('/images/sso/google.png'), user_google_oauth2_omniauth_authorize_path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue