badgateway / oauth2-client

OAuth2 client for Node and browsers
https://www.npmjs.com/package/@badgateway/oauth2-client
MIT License
285 stars 34 forks source link

endpoint domain addresses could differ. #77

Closed cgencer closed 1 year ago

cgencer commented 2 years ago

new endpoint as follows "accounts.google.com/o/oauth2/v2/auth" "www.googleapis.com/oauth2/v4/token"

as per google,

Screen Shot 2022-09-11 at 13 42 50

endpoints could differ, so it could be easier to have full url's on the configuration. and a few real-world examples with public api's could be nice...

evert commented 2 years ago

The configuration resolves relative urls based on the server the same way a browser would. This means that if you specified an absolute url, those urls would be used as-is. And given that they support the discovery document, in theory you only have to specify discoveryEndpoint, which appears to be https://accounts.google.com/.well-known/openid-configuration

Definitely open to having examples in the readme! Once you got it working, lmk what configuration you used and ill edit it in (or send a PR!)