@@ -191,6 +191,42 @@ settings in the same way explained above but with this other suffix::
191191
192192 SOCIAL_AUTH_<uppercase backend name>_REQUEST_TOKEN_EXTRA_ARGUMENTS = {...}
193193
194+
195+ OAuth2 provider URLs override
196+ ------------------------------
197+
198+ By default, OAuth2 backends have hardcoded URLs for authorization and access token
199+ endpoints. However, these can be overridden via settings to support custom OAuth2
200+ providers or alternate deployments of the same provider (e.g., OpenHistoricalMap
201+ instead of OpenStreetMap, or self-hosted instances).
202+
203+ ``SOCIAL_AUTH_AUTHORIZATION_URL ``
204+ Override the authorization URL for OAuth2 backends globally or per-backend.
205+ Example::
206+
207+ SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL = 'https://auth.example.com/auth/realms/myrealm/protocol/openid-connect/auth'
208+
209+ ``SOCIAL_AUTH_ACCESS_TOKEN_URL ``
210+ Override the access token URL for OAuth2 backends globally or per-backend.
211+ Example::
212+
213+ SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL = 'https://auth.example.com/auth/realms/myrealm/protocol/openid-connect/token'
214+
215+ ``SOCIAL_AUTH_REVOKE_TOKEN_URL ``
216+ Override the token revocation URL for OAuth2 backends globally or per-backend.
217+ Example::
218+
219+ SOCIAL_AUTH_GITHUB_REVOKE_TOKEN_URL = 'https://github.example.com/api/revoke'
220+
221+ These settings allow you to use backends with custom deployments. For example,
222+ to use the OpenStreetMap backend with OpenHistoricalMap::
223+
224+ SOCIAL_AUTH_OPENSTREETMAP_AUTHORIZATION_URL = 'https://www.openhistoricalmap.org/oauth/authorize'
225+ SOCIAL_AUTH_OPENSTREETMAP_ACCESS_TOKEN_URL = 'https://www.openhistoricalmap.org/oauth/access_token'
226+
227+ Note that backend-specific settings (with the backend name) take precedence over
228+ generic settings, following the same pattern as other settings in this library.
229+
194230Basic information is requested to the different providers in order to create
195231a coherent user instance (with first and last name, email and full name), this
196232could be too intrusive for some sites that want to ask users the minimum data
0 commit comments