From 52dd95423956f0a23a9fb3b6de59487416cc5cf4 Mon Sep 17 00:00:00 2001 From: NVMakarenko Date: Sat, 2 Nov 2024 13:55:43 +0200 Subject: [PATCH 1/2] add omniauth --- app/views/devise/sessions/new.html.erb | 2 +- app/views/devise/shared/_links.html.erb | 6 +++--- config/routes.rb | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 4a7541d78..56c3a3a38 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -19,7 +19,7 @@
<%= f.submit t(".log_in"), class: "btn w-full font-bold text-center btn-green" %> - <%#= render "devise/shared/links" %> + <%= render "devise/shared/links" %>
<% end %> diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb index 85a31af59..51180ccd0 100644 --- a/app/views/devise/shared/_links.html.erb +++ b/app/views/devise/shared/_links.html.erb @@ -17,9 +17,9 @@ <% end %> diff --git a/config/routes.rb b/config/routes.rb index 7de991fc5..cbcd1faf8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -8,9 +8,9 @@ # end mount Sidekiq::Web => "/sidekiq" - # devise_for :users, only: :omniauth_callbacks, - # controllers: { omniauth_callbacks: - # "users/omniauth_callbacks" } + devise_for :users, only: :omniauth_callbacks, + controllers: { omniauth_callbacks: + "users/omniauth_callbacks" } get "/", to: "application#redirection", as: :root_redirection @@ -19,7 +19,7 @@ end scope "/(:locale)", locale: /uk|en/ do - devise_for :users, only: [:session] + devise_for :users, only: [:session], skip: [:omniauth_callbacks, :registration] # devise_for :users, skip: [:omniauth_callbacks, :registration] # as :user do From 841c00853e69d773f6df0a3199c0f0a05f1cfd6c Mon Sep 17 00:00:00 2001 From: NVMakarenko Date: Sat, 2 Nov 2024 20:34:15 +0200 Subject: [PATCH 2/2] fix rubocop --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index cbcd1faf8..032254e84 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -9,7 +9,7 @@ mount Sidekiq::Web => "/sidekiq" devise_for :users, only: :omniauth_callbacks, - controllers: { omniauth_callbacks: + controllers: { omniauth_callbacks: "users/omniauth_callbacks" } get "/", to: "application#redirection", as: :root_redirection