[openstreetmap/openstreetmap-website] feat: add automatic 3rd party OAuth provider redirect (PR #6248)

Mateusz Woźniak notifications at github.com
Fri Jul 25 16:23:47 UTC 2025


### Description

Following Pull Request proposes adding new query parameter to login page that allows to specify OAuth provider that user
would use for logging in.

### Usage
Navigating user to `https://openstreetmap.com/login?&autologin_provider=google` would automatically trigger redirect to Google Sign In.
Parameter accepts values such as `google`, `facebook`, `microsoft`, `github`, `wikipedia`.

### Motivation
I am founder of https://aedmapa.pl/ mobile app that allows users to browse nearby Automated External Defibrillators (AEDs).
My app allows to contribute to OSM database by adding new AEDs. I'm trying to improve contribution experience.

I get a lot of emails from users that asks for support adding new AEDs. In my app there is a flow for adding new AED. It looks like that:
1. Login (show OpenStreetMap OAuth screen)
2. Authenticate (user successfully signed in using OSM account)
3. Select desired location
4. Insert AED

<img width="2300" height="628" alt="Untitled report (1)" src="https://github.com/user-attachments/assets/e8885f34-0419-4433-81a9-70d5dfe07f4b" />


**Looking at conversation metrics, there is a big 93% drop-off during login process.**
I was trying to investigate this drop-off and I've few hypothesis (mostly gathered from email / phone conversations with users).
- Most of my users are not OpenStreetMap contributors - my app is a first contact for them with OSM data. They don't have OpenStreetMap account.
- Users says they don't want to create new account
- Google Sign In button is simply hidden until the first scroll (please see screenshot).

<img width="50%" height="2622" alt="IMG_0593" src="https://github.com/user-attachments/assets/58025283-856e-4774-9e2a-72e2def47b75" />

In Polish Language version, the buttons are completely invisible.

<img width="50%" height="2622" alt="IMG_0594" src="https://github.com/user-attachments/assets/f4c5db92-26d6-4b37-a96e-d04b3ccda1a5" />


My proposed solution to the problem is to automatically trigger Google Sign In flow. Following PR implements this on OSM website side.

### How has this been tested?

This code has been tested on my local development machine with multiple values passed as query parameter.

You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * feat: add autologin_provider parameter for automatic 3rd party OAuth provider redirect
  * feat: add autologin_provider parameter for automatic 3rd party OAuth provider redirect

-- File Changes --

    M app/assets/javascripts/auth_providers.js (10)
    M app/helpers/user_helper.rb (4)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list