cmd-johnson / deno-oauth2-client

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

Allow Array of strings for scope in token response #36

Closed mitchwadair closed 1 year ago

mitchwadair commented 1 year ago

Motivation

I would like to use this library to connect to an OAuth provider (Twitch in my case) which returns scopes as an array of strings rather than a space-separated string. These changes update the token response parser to allow this case.

Testing

Updated tests to reflect this change

Tested using Deno KV OAuth's demo test. This can be seen on my fork of the library, when switching deps.ts to point to my changes here. image

Let me know if there's anything I missed or need to change 👍

mitchwadair commented 1 year ago

I saw in another issue this comment that kinda covers this PR. I think I'll close this in favor of waiting for that work to be done, since this change is not technically spec compliant