[openstreetmap/openstreetmap-website] Remove legacy OpenID login (PR #6038)

mmd notifications at github.com
Sun May 25 17:20:52 UTC 2025


@mmd-osm commented on this pull request.



>        <% end -%>
     </div>
   <% end %>
-
-  <%# :tabindex starts high to allow rendering at the bottom of the template %>
-  <%= form_tag auth_path(:provider => "openid"), :id => "openid_login_form", :class => "collapse" do %>
-    <div class="mb-3">
-      <label for="openid_url" class="form-label">
-        <%= image_tag "auth_providers/openid.svg", :size => "36", :alt => "", :class => "align-text-bottom" %>
-        <%= t ".openid_url" %>
-      </label>
-      <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>

Ok, I think I know what's going on. We used to have the same "referer" field twice on the /user/new page, once on the openid form (this line), and another time as field  in the "new_user" form:   `<%= hidden_field_tag("referer", h(@referer)) unless @referer.nil? %>` (new.html.erb).

Since the field in the openid form was always present, auth_providers.js never returned "undefined". Now that we're removing this form, this assumption no longer holds true.

So the change in auth_providers.js to have an empty string as fallback should be backwards compatible. Previously, the "auth buttons" always had a referer URL parameter, even if the value was an empty string.

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

Message ID: <openstreetmap/openstreetmap-website/pull/6038/review/2866902599 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250525/ebbf0ea6/attachment.htm>


More information about the rails-dev mailing list