Amazon SSO added

This commit is contained in:
Christoph Haas 2017-04-17 13:11:44 +02:00
parent 2a7491edcd
commit 65723d3063
7 changed files with 25 additions and 3 deletions

View file

@ -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"])

View file

@ -13,7 +13,8 @@ class User < ApplicationRecord
:omniauthable, :omniauth_providers => [
:launchpad,
:stackexchange,
:google_oauth2
:google_oauth2,
:amazon
]

View file

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