-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
missing adding the agent to the request options for the auth request
async authorize(query) {
if (!query) throw new Error('The URL query paramaters are required.');
const payload = {
client_id: this.config.clientId,
client_secret: this.config.secret,
redirect_uri: this.config.callback,
grant_type: 'authorization_code',
code: query.code,
scope: query.scope,
context: query.context
};
const request = new Request('login.bigcommerce.com', {
failOnLimitReached: this.config.failOnLimitReached
});
return await request.run('post', '/oauth2/token', payload);
}
should be
async authorize(query) {
if (!query) throw new Error('The URL query paramaters are required.');
const payload = {
client_id: this.config.clientId,
client_secret: this.config.secret,
redirect_uri: this.config.callback,
grant_type: 'authorization_code',
code: query.code,
scope: query.scope,
context: query.context
};
const request = new Request('login.bigcommerce.com', {
failOnLimitReached: this.config.failOnLimitReached,
agent: this.config.agent
});
return await request.run('post', '/oauth2/token', payload);
}
Metadata
Metadata
Assignees
Labels
No labels