Skip to content
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

Error: Please supply client_id and client_secret via use() #23

Closed
grantmac opened this issue Apr 11, 2014 · 8 comments
Closed

Error: Please supply client_id and client_secret via use() #23

grantmac opened this issue Apr 11, 2014 · 8 comments

Comments

@grantmac
Copy link

On the first hit of the route /authorize_user authorises oaky.
On further hits of the route /authorize_user it results in a "Error: Please supply client_id and client_secret via use()" error, even thought both the client_id and client_secret's are set in the use.

@spolu
Copy link

spolu commented Apr 11, 2014

Thanks for filing the bug, we'll look into it asap.
Quick workaround is to recreate an api object for each authorize request (these are stateless and very lightweight)

n1t0 pushed a commit that referenced this issue Apr 24, 2014
@n1t0
Copy link
Member

n1t0 commented Apr 24, 2014

Fixed by 307b063

New version 0.3.0 (Changelog) released.

@n1t0 n1t0 closed this as completed Apr 24, 2014
@codeOfRobin
Copy link

Got this issue again.

Error: Please supply client_id and client_secret via use()

@andrewfschorr
Copy link

This seems to be happening again for me as well, subsequent hits after the initial one throw the above error.

@dhirajsharma072
Copy link

I am getting same error "Please supply client_id and client_secret via use()" in version 0.5.8.
Please suggest solution for this. Thanks!

@dhirajsharma072
Copy link

Hi,
I found the solution of error "Please supply client_id and client_secret via use()" in version 0.5.8.
Here is my sample code for solution.

var instagram = require('instagram-node').instagram();
var redirect_url = config.instagram.callbackURL; // callback url of instagram

exports.getRedirectionURL = function () {
  instagram.use({
    client_id: config.instagram.clientID,               //app client id
    client_secret: config.instagram.clientSecret  // app secret 
  });
  return instagram.get_authorization_url(redirect_url, {
    scope: ['basic']
  });
};

Each time before calling instagram.get_authorization_url(), please call instagram.use(option).

Hope it will help for you.

@born2net
Copy link

I see the same issue recently...
regards

Sean

@pxlprfct
Copy link

I'm still seeing this issue - first auth is fine, but subsequent auths will fail.
I slightly modified @dhirajsharma072 fix - and all seems good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants