beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
61 stars 53 forks source link

Make OAuth discovery work locally #499

Closed geekingfrog closed 1 week ago

geekingfrog commented 1 month ago

Describe the Feature

The discovery endpoint for OAuth is not returning the correct values for local development.

Expected Behavior

curl http://localhost:4000/.well-known/oauth-authorization-server returns (irrelevant fields omitted):

{
  "issuer": "https://beyondallreason.info",
  "authorization_endpoint": "https://beyondallreason.info/oauth/authorize",
  "token_endpoint": "https://beyondallreason.info/oauth/token",
}

none of these URL work locally and should instead be http://localhost:4000/…

To make this work, adding new env var is an option, but in this case, make sure to also update the ansible templates.