cmd-johnson / deno-oauth2-client

Minimalistic OAuth 2.0 client for Deno.
MIT License
45 stars 9 forks source link

suggestion: remove `OAuth2ClientConfig.defaults` #41

Open iuioiua opened 10 months ago

iuioiua commented 10 months ago

Currently, the OAuth2ClientConfig interface has a defaults property containing requestOptions, scope and stateValidator.

I think the interface would be a little easier to work with if these properties didn't lie within the defaults property and instead just lived alongside the other properties in the interface, top-level. E.g. having these flat would allow us to use Required<OAuth2ClientConfig, "scope" | "redirectUri">.

If this were done, usability or understandability would not be lost. I'd be happy to submit a PR.

Related https://github.com/denoland/deno_kv_oauth/issues/193