From 7e7b32c0e005e47d59956ff2941e753c514a160d Mon Sep 17 00:00:00 2001 From: Yanick Minder <79108296+kcinay055679@users.noreply.github.com> Date: Mon, 26 Aug 2024 08:16:53 +0200 Subject: [PATCH] Fix devise new template (#762) * remove useless '=' * fix translation key of sign_in_with and provide default location for omniauth callback --- app/views/devise/sessions/new.html.haml | 3 +-- config/routes.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index da0ab90b6..8422dbe3b 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -2,7 +2,6 @@ = ti("devise.sign_in") - if devise_mapping.omniauthable? - resource_class.omniauth_providers.each do |provider| - = - = button_to ti("sign_in_with", provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider), {data: { turbo: false }, class: "btn btn-primary"} + = button_to ti("devise.sign_in_with", provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider), {data: { turbo: false }, class: "btn btn-primary"} - else = ti("devise.no_omniauth_providers") \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index ee0812f9c..94ceef960 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,7 +5,7 @@ devise_for :auth_users, skip: [:sessions], controllers: - { omniauth_callbacks: 'omniauth_callbacks' } + { omniauth_callbacks: 'omniauth_callbacks' }, defaults: { locale: nil } devise_scope :auth_user do get 'sign_in', :to => 'devise/sessions#new', :as => :new_auth_user_session