Skip to content

Commit ba02c2f

Browse files
committed
adjust omniauth route definitions
1 parent 09eda33 commit ba02c2f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

config/routes.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
require 'sidekiq/web'
44

55
BetterTogether::Engine.routes.draw do # rubocop:todo Metrics/BlockLength
6+
devise_for :users,
7+
class_name: BetterTogether.user_class.to_s,
8+
only: :omniauth_callbacks,
9+
controllers: { omniauth_callbacks: 'better_together/users/omniauth_callbacks'}
10+
611
scope ':locale', # rubocop:todo Metrics/BlockLength
712
locale: /#{I18n.available_locales.join('|')}/ do
813
# bt base path
@@ -14,14 +19,14 @@
1419
class_name: BetterTogether.user_class.to_s,
1520
controllers: {
1621
confirmations: 'better_together/users/confirmations',
17-
omniauth_callbacks: 'better_together/users/omniauth_callbacks',
22+
# omniauth_callbacks: 'better_together/users/omniauth_callbacks',
1823
passwords: 'better_together/users/passwords',
1924
registrations: 'better_together/users/registrations',
2025
sessions: 'better_together/users/sessions'
2126
# unlocks: 'better_together/users/unlocks'
2227
},
2328
module: 'devise',
24-
skip: %i[unlocks],
29+
skip: %i[unlocks omniauth_callbacks],
2530
path: 'users',
2631
path_names: {
2732
sign_in: 'sign-in',

spec/dummy/db/schema.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,7 @@
689689
t.string "identifier", limit: 100, null: false
690690
t.boolean "host", default: false, null: false
691691
t.boolean "protected", default: false, null: false
692-
t.uuid "community_id", null: false
693-
t.string "privacy", limit: 50, default: "public", nul
692+
t.string "privacy", limit: 50, default: "public", null: false
694693
t.string "slug"
695694
t.uuid "community_id"
696695
t.string "url", null: false

0 commit comments

Comments
 (0)