authTokenFromOauth1 not working
See original GitHub issueHi, the authTokenFromOauth1 method doesn’t work because it uses “app” authorization, which isn’t implemented in the SDK. It throws this error: “Unhandled auth type: app”
I managed to workaround by setting the “Authorization” header to “Basic <base64 encoded app_key:app_secret>” when rpcRequest’s auth parameter (in rpc-request.js) is “app”. I had to pass the app_key and app_secret along with the object that supplies the oauth1_token and oauth1_token_secret properties to authTokenFromOauth1. To prevent causing a server-side error, I had to delete them from the object right after using them to prevent them being sent along with the actual API request.
case 'app': apiRequest.set('Authorization', 'Basic ' + btoa(body.app_key + ":" + body.app_secret); delete body.app_key; delete body.app_secret; break;
Can you guys fix this please?
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (12 by maintainers)
Top GitHub Comments
Thank you for the update. The v1 API is set to stop working in 30 days. Can you please fix this immediately so we can have a smooth migration?
This is released in v3.0.0.