[openstreetmap/openstreetmap-website] Re-arrange login and signup screens as discussed in #4128 (PR #4455)

Milan Cvetkovic notifications at github.com
Mon Jan 15 16:08:45 UTC 2024


@milan-cvetkovic commented on this pull request.



> +    <h1><%= t ".title" %></h1>
+  </div>
+  <div class='header-illustration new-user-arm d-none d-md-block'></div>
+<% end %>
+
+<div class="auth-container">
+  <div class="text-muted col-sm form-container">
+
+    <h4><%= t ".welcome" %></h4>
+
+    <%= bootstrap_form_for current_user, :url => { :action => "create_association" } do |f| %>
+      <%= hidden_field_tag("referer", h(@referer)) unless @referer.nil? %>
+      <%= f.hidden_field :auth_provider %>
+      <%= f.hidden_field :auth_uid %>
+
+      <% if current_user.errors[:email].empty? %>

@tomhughes This is actually a bit tricky and probably rare scenario. User selects "login with X" and after logging in with X, X reports that user has an email address `user at X.com`. But that address is already used, likely by the same user. The implementation currently un-hides the email field and forces user to choose different email.

This is not really approprirate, since the user may not have another email address to offer. User would already have OSM username/password account. Perhaps the proper response would be to offer them to link their existing OSM account with auth_provider they chose.

Perhaps we could simply redirect them to "Login" page instead of offering them (and forcing them) to provide alternate email?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4455#discussion_r1452555944
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4455/review/1821970353 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240115/d009c031/attachment.htm>


More information about the rails-dev mailing list