You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I used patch-package to patch @boxcast/boxcast-sdk-js@2.0.2 for the project I'm working on. I wanted to be able to use the sdk in node.js but I am using OAuth tokens rather than a clientId:clientSecret pair to authenticate. Currently your SDK only accepts a clientId and clientSecret to authenticate and generate a token, however since I already have a token I want to be able to just pass my existing token as the first argument. I expect this would be something others would need to be able to do as well so I decided to create this issue for further review.
@colin-oos Hi Colin! My pleasure, it has been a fun project so far ^_^.
I like your suggestion of enabling the SDK to use a passed-in token instead of being forced to grab a new one just to store it in STATE. That said, rather than modifying the authenticate() method, I think we should keep authenticate() doing just that, and adding a setToken method that can be called when we already have a token. How does that sound?
If you like the idea, we can look at getting it into the next release of the SDK. In the mean time, feel free to submit a PR.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
@boxcast/boxcast-sdk-js@2.0.2
for the project I'm working on. I wanted to be able to use the sdk in node.js but I am using OAuth tokens rather than a clientId:clientSecret pair to authenticate. Currently your SDK only accepts a clientId and clientSecret to authenticate and generate a token, however since I already have a token I want to be able to just pass my existing token as the first argument. I expect this would be something others would need to be able to do as well so I decided to create this issue for further review.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: