diff --git a/app/models/concerns/omniauthable.rb b/app/models/concerns/omniauthable.rb index 29e09c3d..b0fbb21b 100644 --- a/app/models/concerns/omniauthable.rb +++ b/app/models/concerns/omniauthable.rb @@ -12,10 +12,7 @@ module Omniauthable # First, try to find user by provider and uid (for linked accounts) user = find_by(provider: provider, uid: uid) - if user - # User found by provider/uid - return user - end + return user if user # If not found, try to find by email user = find_by(email: data['email']) diff --git a/app/views/settings/index.html.erb b/app/views/settings/index.html.erb index 3653fe56..d33d86b1 100644 --- a/app/views/settings/index.html.erb +++ b/app/views/settings/index.html.erb @@ -72,11 +72,12 @@ <% unless DawarichSettings.self_hosted? %>
- OAuth providers configured: <%= OMNIAUTH_PROVIDERS.map(&:to_s).join(', ').presence || 'None' %> + You've connected your account using the following OAuth provider: + <%= current_user.provider.capitalize %>