Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
Fix OAuth for Linky (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
corradio committed Oct 6, 2020
1 parent 5680d0b commit c4fb1fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion integrations/authentication/OAuth2Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,11 @@ export default class {
client_id: this.clientId,
code: authorizationCode,
grant_type: 'authorization_code',
scope: this.scope,
};
// The Linky API doesn't provide a scope and fails if it is added with value `undefined`
if (this.scope) {
formData.scope = this.scope;
}

if (!omitRedirectUri) {
formData.redirect_uri = getCallbackUrl();
Expand Down

0 comments on commit c4fb1fd

Please sign in to comment.