disable turbo. unwanted side effects.
This commit is contained in:
parent
882f7c4567
commit
522cd56807
5 changed files with 26 additions and 17 deletions
|
|
@ -3,6 +3,14 @@
|
|||
# Use this hook to configure devise mailer, warden hooks and so forth.
|
||||
# Many of these configuration options can be set straight in your model.
|
||||
Devise.setup do |config|
|
||||
# When using Devise with Hotwire/Turbo, the http status for error responses
|
||||
# and some redirects must match the following. The default in Devise for existing
|
||||
# apps is `200 OK` and `302 Found` respectively, but new apps are generated with
|
||||
# these new defaults that match Hotwire/Turbo behavior.
|
||||
# Note: These might become the new default in future versions of Devise.
|
||||
config.responder.error_status = :unprocessable_entity
|
||||
config.responder.redirect_status = :see_other
|
||||
|
||||
# The secret key used by Devise. Devise uses this key to generate
|
||||
# random tokens. Changing this key will render invalid all existing
|
||||
# confirmation, reset password and unlock tokens in the database.
|
||||
|
|
@ -41,7 +49,7 @@ Devise.setup do |config|
|
|||
# You can also supply a hash where the value is a boolean determining whether
|
||||
# or not authentication should be aborted when the value is not present.
|
||||
# config.authentication_keys = [:email]
|
||||
config.authentication_keys = [:email, :provider]
|
||||
config.authentication_keys = %i[email provider]
|
||||
|
||||
# Configure parameters from the request object used for authentication. Each entry
|
||||
# given should be a request method and it will automatically be passed to the
|
||||
|
|
@ -256,7 +264,7 @@ Devise.setup do |config|
|
|||
# config.navigational_formats = ['*/*', :html]
|
||||
|
||||
# The default HTTP method used to sign out a resource. Default is :delete.
|
||||
config.sign_out_via = :delete
|
||||
config.sign_out_via = :get
|
||||
|
||||
# ==> OmniAuth
|
||||
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
||||
|
|
@ -292,18 +300,18 @@ Devise.setup do |config|
|
|||
# Configuration: https://github.com/m0n9oose/omniauth_openid_connect
|
||||
config.omniauth :openid_connect, {
|
||||
name: :salsa,
|
||||
scope: [:openid, :email, :profile],
|
||||
scope: %i[openid email profile],
|
||||
discovery: true,
|
||||
issuer: "https://salsa.debian.org",
|
||||
issuer: 'https://salsa.debian.org',
|
||||
client_options: {
|
||||
port: 443,
|
||||
scheme: "https",
|
||||
host: "salsa.debian.org",
|
||||
scheme: 'https',
|
||||
host: 'salsa.debian.org',
|
||||
identifier: ENV['SALSA_OAUTH_KEY'],
|
||||
secret: ENV['SALSA_OAUTH_SECRET'],
|
||||
#redirect_uri: "http://localhost:3000/users/auth/salsa/callback",
|
||||
# redirect_uri: "http://localhost:3000/users/auth/salsa/callback",
|
||||
redirect_uri: "#{Rails.configuration.base_url}/users/auth/salsa/callback",
|
||||
ssl: { ca_path: '/etc/ssl/certs'}
|
||||
ssl: { ca_path: '/etc/ssl/certs' }
|
||||
}
|
||||
}
|
||||
OpenIDConnect.logger = Rails.logger
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue