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

redirectUri and serverUri swapped in oauth #42

Open
muhang opened this issue Mar 30, 2015 · 1 comment
Open

redirectUri and serverUri swapped in oauth #42

muhang opened this issue Mar 30, 2015 · 1 comment

Comments

@muhang
Copy link

muhang commented Mar 30, 2015

It appears that the redirectUri passed into the oauth option hash isn't used in generating the authorize uri. After chasing my tail for a little while and wondering why I kept getting a redirect_uri_mismatch, I took a look at the getAuthorizeUri function on line 175, and it looks like the issue is on line 180. Here's the full text:

MailChimpOAuth.prototype.getAuthorizeUri = function () {

    var params = {
        response_type: 'code',
        client_id: this.clientId,
        redirect_uri: this.serverUri+':'+this.httpPort
    };

    return 'https://login.mailchimp.com/oauth2/authorize?'+querystring.stringify(params);

}

I'm guessing the third param should be redirect_uri: this.redirectUri

@sumit0k
Copy link
Contributor

sumit0k commented May 19, 2016

Fixed in pull request #53

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

2 participants