-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osm.org as identity provider for dev instance #5063
Comments
This does not appear to be reporting an issue in this code base. Frankly I have no idea what it's trying to say or suggest but as best I can tell it's an operational request relating to one or more of the dev instances? |
I don't think it's an operational request, since we're not adding Gems or translations to the Rails port there, right? So the use case here is: all non "osm.org production" Rails instances can benefit from the "osm.org production" login. Users don't need remember separate logins, which makes these instances more easily accessible for a wider audience. Originally, this request came from OHM. We're constantly telling mappers not to map razed or dismantled railways, and map them in OHM instead. However, as it's a completely different project, they would need a new user + password, which is rather cumbersome. This config lowers the barrier a bit so mappers can at least use their osm.org login for mapping in OHM. |
So you want to add this to our code base even though we'll never use it? If you really want that then why not open a PR instead of pasting patches into an issue? |
At least we'll never use it in production, as it would be kind of pointless to log on to osm.org using osm.org. It could be useful to get more people to try out new features on the development instance, such as microcosms. Today, it's very difficult to convince people to test anything, in particular, if that involves signing up on another site. Ideally, the experience would be similar to the Discourse community forum. |
In the early early days of Microcosms, I actually coded this up to facilitate my own development. Would love to see it. Let me know if I should dig up old code. |
Thanks! We already have a branch with the required changes: https://github.com/mmd-osm/openstreetmap-website/tree/patch/oauthoidc It’s almost exclusively configuration settings. Luckily there’s no need to do lots of coding here. |
Back in OpenHistoricalMap/issues#662, we've been discussing to use osm.org as identity provider for other sites, such as our dev instances. This should make it easier for our users to try out new features, such as https://microcosms.apis.dev.openstreetmap.org, without remembering a new user + password for the dev instance.
I'm documenting all required steps here. For discussion...
Add omniauth_openid_connect gem
Link: https://github.com/omniauth/omniauth_openid_connect
Trust osm.org as confirmed email provider
Add osm.org as new OIDC provider
Updated translations
Default settings.yml
Provider list updated
Icon
Copy /app/assets/images/osm_logo.svg to /app/assets/images/auth_providers/openstreetmap.svg
Register new oauth2 application on osm.org with
http://127.0.0.1:3000/auth/openstreetmap/callback
(this could include many different URLs, such as: https://microcosms.apis.dev.openstreetmap.org/auth/openstreetmap/callback )
Permissions: Sign-in using OpenStreetMap (openid)
Confidential application
Copy client id + secret to settings.local.yml on microcosms rails instance
Screenshots
Email and display name are not taken over. I don't have admin permission on osm.org to define an OAuth2 app with email reading permissions. Maybe this would also work out of the box.
Most importantly, users don't have to remember a separate logon + password for the dev instance, they can simply click on the "Log on with OpenStreetMap" button next time.
User settings show External Authentication using OpenStreetMap
The text was updated successfully, but these errors were encountered: