[openstreetmap/openstreetmap-website] Add support for OAuth 2 (#3177)

mmd notifications at github.com
Tue Apr 13 20:41:43 UTC 2021


A few hints for people who want to try this out using Postman:

Create new application at https://oauth2.apis.dev.openstreetmap.org/oauth2/applications, note down client id + secret for later

In Postman, create a new request, switch to the Authorization tab
![demo](https://user-images.githubusercontent.com/5842757/114618048-322abd80-9ca9-11eb-8067-4728df48ec56.png)


* Authorization Type OAuth 2,0
* Add authorization data to _Request Headers_
* Grant type: Authorization Code / or / Authorization Code (With PKCE)
* (some callback url)
* Auth URL: `https://oauth2.apis.dev.openstreetmap.org/oauth2/authorize`
* Access Token URL: `https://oauth2.apis.dev.openstreetmap.org/oauth2/token`
* Client ID + Client Secret -> see previous app registration step
* Scope: see below, needs to be a subset of the scopes used for application registration

Scope names:

- read_prefs:  read their user preferences
- write_prefs: modify their user preferences
- write_diary: create diary entries, comments and make friends
- write_api:   modify the map
- read_gpx:    read their private GPS traces
- write_gpx:   upload GPS traces
- write_notes: modify notes



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3177#issuecomment-819038597
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210413/22b024a1/attachment.htm>


More information about the rails-dev mailing list