| 1 |
OpenStreetMap |
| 2 |
------------- |
| 3 |
|
| 4 |
The builtin OpenStreetMap provider is using the now deprecated OAuth 1.0 |
| 5 |
protocol. You can no longer create OAuth 1.0 clients, meaning this provider is |
| 6 |
there for legacy reasons only. |
| 7 |
|
| 8 |
In order to make use of the new OSM OAuth 2.0 protocol, you can simply configure an OpenID Connect app. |
| 9 |
|
| 10 |
First, register your client application here: https://www.openstreetmap.org/oauth2/applications |
| 11 |
|
| 12 |
Then, configure the settings (or, setup a ``SocialApp``) using the client ID/secret you received while registering the application: |
| 13 |
|
| 14 |
.. code-block:: python |
| 15 |
|
| 16 |
SOCIALACCOUNT_PROVIDERS = { |
| 17 |
"openid_connect": { |
| 18 |
"APPS": [ |
| 19 |
{ |
| 20 |
"provider_id": "openstreetmap", |
| 21 |
"name": "OpenStreetMap", |
| 22 |
"client_id": "<insert-id>", |
| 23 |
"secret": "<insert-secret>", |
| 24 |
"settings": { |
| 25 |
"server_url": "https://www.openstreetmap.org/.well-known/oauth-authorization-server", |
| 26 |
"scope": ["openid", "read_prefs"], |
| 27 |
}, |
| 28 |
}, |
| 29 |
] |
| 30 |
}, |
| 31 |
}, |
| 32 |
|
| 33 |
|
| 34 |
For more information, consult the OpenStreetMap OAuth documentation: https://wiki.openstreetmap.org/wiki/OAuth |