Make relative URLs just work
Created by: ghost
Thanks to #461, sites that have oauth as a subpath of another path (such as Github — https://github.com/login/oauth/authorize) are supported. But you have to change the config to make it work. The authorisation and token URLs are defined as absolute paths (/oauth/authorize). So even though, say in the GitHub case, the auth URL is indeed oauth/authorize, the leading slash needs to be removed in the authorize_url param, otherwise you lose the /signin and get https://github.com/oauth/authorize, which 404s.
Changing the config works, but it’s annoying to do — it feels like a hack. This PR suggests a config-over-configuration approach. Define the auth and token URLs as relative paths and everything just works, no config change needed.
/cc @elliotcm