From bb096168bb0e72016cde6c8bf4af9544dae136be Mon Sep 17 00:00:00 2001 From: Hai Phan Nguyen Date: Wed, 10 Jun 2020 20:56:28 +0700 Subject: [PATCH] Ignore sync uid in case confirmable mail changed (#1407) * Ignore sync uid in case confirmable mail changed * Update user_omniauth_callbacks.rb * Update user_omniauth_callbacks.rb --- .../devise_token_auth/concerns/user_omniauth_callbacks.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/devise_token_auth/concerns/user_omniauth_callbacks.rb b/app/models/devise_token_auth/concerns/user_omniauth_callbacks.rb index 49cb8a9d1..50f77c698 100644 --- a/app/models/devise_token_auth/concerns/user_omniauth_callbacks.rb +++ b/app/models/devise_token_auth/concerns/user_omniauth_callbacks.rb @@ -23,6 +23,9 @@ def email_provider? end def sync_uid + if devise_modules.include?(:confirmable) && !@bypass_confirmation_postpone + return if postpone_email_change? + end self.uid = email if email_provider? end end