Skip to content

redirectUri and serverUri swapped in oauth #42

@muhang

Description

@muhang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions