[openstreetmap/openstreetmap-website] Re-arrange login and signup screens as discussed in #4128 (PR #4455)
Milan Cvetkovic
notifications at github.com
Tue Feb 27 12:49:58 UTC 2024
@milan-cvetkovic commented on this pull request.
> @@ -290,8 +241,23 @@ def auth_success
else
failed_login t("sessions.new.auth failure")
end
+ elsif user.nil? && user = User.find_by(:email => email)
+ user[:auth_uid] = uid
+ user[:auth_provider] = provider
+ user.save!
+
+ user.deactivate! if user.status == "active" && !email_verified
+
+ if user.status == "active"
+ successful_login(user)
+ else
+ session[:token] = user.tokens.create.token
+ UserMailer.signup_confirm(user, user.tokens.create(:referer => session[:referer])).deliver_later
+ redirect_to :controller => :confirmations, :action => :confirm, :display_name => user.display_name
+ end
I have reverted the "hijacking of the OSM account by social sign-in" feature. Instead, I only detect the condition and display a message as the flash notice. Currently the text says:
> If you already have OpenStreetMap account and wish to use 3rd party identity provider, please login using your password and modify settings of your account.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4455#discussion_r1504174863
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4455/review/1903408081 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240227/1ad0ff31/attachment.htm>
More information about the rails-dev
mailing list