question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

authTokenFromOauth1 not working

See original GitHub issue

Hi, 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:closed
  • Created 7 years ago
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
pneyrinckcommented, May 24, 2017

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?

0reactions
greg-dbcommented, Jan 23, 2018

This is released in v3.0.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropbox API Support & Feedback
Solved: Hi, We are migrating from oauth1 to oauth2 and use your from_oauth1 url to get the new token. The endpoint works for...
Read more >
Dropbox Node SDK Class
authTokenFromOauth1 (arg). Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token. Parameters: Name, Type ...
Read more >
How Do I use typescript declarations (.ts.d files) to consume a ...
I feel like this is not the right way....but I dont see why it wont work. ... DropboxOptions); public authTokenFromOauth1(arg: auth.
Read more >
ERPNext Forum
ERPNext Forum · HTTPError: 400 Client Error: Bad Request for url: https://api.dropboxapi.com/2/auth/token/from_oauth1.
Read more >
dropbox - UNPKG
n * @function Dropbox#authTokenFromOauth1\n * @arg {AuthTokenFromOAuth1Arg} arg - The request ... Do not use this to upload a file larger than 150...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found