Skip to content

Commit a9904e5

Browse files
authored
Fix critical error on registration with confirmation mode (#1447)
* Ignore sync uid in case confirmable mail changed * Update user_omniauth_callbacks.rb * Update user_omniauth_callbacks.rb * fix crash on devise 4.7.2+ * fix critical error on registration allow to reflect email -> uid on creation
1 parent 7ecdf0e commit a9904e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/devise_token_auth/concerns/user_omniauth_callbacks.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def email_provider?
2323
end
2424

2525
def sync_uid
26-
if devise_modules.include?(:confirmable) && !@bypass_confirmation_postpone
27-
return if postpone_email_change?
26+
unless self.new_record?
27+
return if devise_modules.include?(:confirmable) && !@bypass_confirmation_postpone && postpone_email_change?
2828
end
2929
self.uid = email if email_provider?
3030
end

0 commit comments

Comments
 (0)