Salsa login works
This commit is contained in:
parent
b2ed771663
commit
bc507cbe39
6 changed files with 84 additions and 51 deletions
|
|
@ -286,22 +286,44 @@ Devise.setup do |config|
|
|||
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
||||
|
||||
# config.omniauth :launchpad, 'debshots'
|
||||
config.omniauth :google_oauth2, ENV["GOOGLE_CLIENT_ID"], ENV["GOOGLE_CLIENT_SECRET"],
|
||||
:client_options => {:ssl => {:ca_path => '/etc/ssl/certs'}}
|
||||
|
||||
config.omniauth :open_id, name: :stackexchange, identifier: 'https://openid.stackexchange.com',
|
||||
:client_options => {:ssl => {:ca_path => '/etc/ssl/certs'}}
|
||||
|
||||
config.omniauth :open_id, name: :launchpad, identifier: 'https://login.ubuntu.com',
|
||||
:client_options => {:ssl => {:ca_path => '/etc/ssl/certs'}}
|
||||
|
||||
config.omniauth :amazon, ENV['AMAZON_CLIENT_ID'], ENV['AMAZON_CLIENT_SECRET'], :client_options =>
|
||||
{:ssl => {:ca_path => '/etc/ssl/certs'}}
|
||||
|
||||
config.omniauth :github, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_CLIENT_SECRET'],
|
||||
# Hint: https://salsa.debian.org/.well-known/openid-configuration
|
||||
# Configuration: https://github.com/m0n9oose/omniauth_openid_connect
|
||||
config.omniauth :openid_connect, {
|
||||
name: :salsa,
|
||||
scope: [:openid, :email, :profile],
|
||||
discovery: true,
|
||||
issuer: "https://salsa.debian.org",
|
||||
client_options: {
|
||||
ssl: { ca_path: '/etc/ssl/certs' }
|
||||
port: 443,
|
||||
scheme: "https",
|
||||
host: "salsa.debian.org",
|
||||
identifier: ENV['GITLAB_OAUTH_KEY'],
|
||||
secret: ENV['GITLAB_OAUTH_SECRET'],
|
||||
redirect_uri: "http://localhost:3000/users/auth/salsa/callback",
|
||||
ssl: { ca_path: '/etc/ssl/certs'}
|
||||
}
|
||||
}
|
||||
OpenIDConnect.logger = Rails.logger
|
||||
OmniAuth.config.logger = Rails.logger if Rails.env.development?
|
||||
|
||||
# config.omniauth :google_oauth2, ENV["GOOGLE_CLIENT_ID"], ENV["GOOGLE_CLIENT_SECRET"],
|
||||
# :client_options => {:ssl => {:ca_path => '/etc/ssl/certs'}}
|
||||
|
||||
# config.omniauth :open_id, name: :stackexchange, identifier: 'https://openid.stackexchange.com',
|
||||
# :client_options => {:ssl => {:ca_path => '/etc/ssl/certs'}}
|
||||
|
||||
# config.omniauth :open_id, name: :launchpad, identifier: 'https://login.ubuntu.com',
|
||||
# :client_options => {:ssl => {:ca_path => '/etc/ssl/certs'}}
|
||||
|
||||
# config.omniauth :amazon, ENV['AMAZON_CLIENT_ID'], ENV['AMAZON_CLIENT_SECRET'], :client_options =>
|
||||
# {:ssl => {:ca_path => '/etc/ssl/certs'}}
|
||||
|
||||
# config.omniauth :github, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_CLIENT_SECRET'],
|
||||
# client_options: {
|
||||
# ssl: { ca_path: '/etc/ssl/certs' }
|
||||
# }
|
||||
|
||||
# ==> Turbolinks configuration
|
||||
# If your app is using Turbolinks, Turbolinks::Controller needs to be included to make redirection work correctly:
|
||||
#
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ Rails.application.routes.draw do
|
|||
|
||||
get 'admin/integration'
|
||||
|
||||
# https://www.rubydoc.info/github/plataformatec/devise/ActionDispatch%2FRouting%2FMapper:devise_for
|
||||
devise_for :users, controllers: {
|
||||
# registrations: "users/registrations",
|
||||
# passwords: "users/passwords",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue