[openstreetmap/openstreetmap-website] Add support for Apple authentication (PR #6298)

Tom Hughes notifications at github.com
Wed Aug 6 17:25:03 UTC 2025


This adds support for Sign in with Apple as requested in #2799.

The main commit is a straightforward addition of a new authentication provider along the lines of the existing ones.

The second commit is a workaround for the problem described in https://github.com/openstreetmap/openstreetmap-website/issues/2799#issuecomment-3156472926 and works by monkey patching the omniauth oauth2 provider to redirect any callback that comes in via POST to GET so that we get the session cookie, allowing us to associate the response with the ongoing login attempt.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/6298

-- Commit Summary --

  * Add support for Apple authentication
  * Monkey patch OmniAuth to redirect POST callbacks to GET

-- File Changes --

    M Gemfile (1)
    M Gemfile.lock (15)
    A app/assets/images/auth_providers/apple.svg (3)
    M app/controllers/users_controller.rb (2)
    M config/initializers/omniauth.rb (6)
    A config/initializers/omniauth_oauth2.rb (22)
    M config/locales/en.yml (4)
    M config/settings.yml (4)
    M config/settings/test.yml (4)
    M lib/auth.rb (1)
    M test/integration/login_test.rb (150)
    M test/integration/user_creation_test.rb (144)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/6298.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6298.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/6298 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250806/a4dee855/attachment-0001.htm>


More information about the rails-dev mailing list