-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Your new implementation does not work as intended #23
Comments
Does this break things? An empty
You're not doing it right. Either include the scope as the last parameter to oauth.clientCredentials(), or as an property to the function that oauth.clientCredentials() returns. For example: oauth.clientCredentials(axios, 'https://example.com', 'foo', 'bar', 'baz')() will send Or: const getClientCredentials = oauth.clientCredentials(axios, 'https://example.com', 'foo', 'bar')
getClientCredentials({ scope: 'baz' }) will send |
Yes, returning an
Yes, I know. But you must update your |
Resolved in v2.0.1 |
Thank you! 🚀 |
Sorry, but your new implementation (version 2) do not work as intended.
scope
) are declared indata
even if not set.The call
oauth.clientCredentials(axios, 'https://example.com', 'foo', 'bar')()
sendgrant_type=client_credentials&client_id=foo&client_secret=bar&scope=
to the API.data
.The call
oauth.clientCredentials(axios, 'https://example.com', 'foo', 'bar')('baz')
send0=b&1=a&2=z&grant_type=client_credentials&client_id=foo&client_secret=bar&scope=
to the API.The text was updated successfully, but these errors were encountered: