We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc10228 commit 6157255Copy full SHA for 6157255
1 file changed
lib/index.js
@@ -88,7 +88,13 @@ class NetatmoClient {
88
throw new Error('Redirect url must be provided')
89
}
90
this.state = statePrefix + Math.random() * 10000000000000000
91
- return `${baseURL}/oauth2/authorize?client_id=${this.clientId}&redirect_uri=${this.redirectUrl}&scope=${this.scope}&state=${this.state}`
+ const query = querystring.stringify({
92
+ client_id: this.clientId,
93
+ redirect_uri: this.redirectUrl,
94
+ scope: this.scope,
95
+ state: this.state,
96
+ })
97
+ return `${baseURL}/oauth2/authorize?${query}`
98
99
100
/**
0 commit comments