Skip to content

Commit

Permalink
fix: fix getAuthUrl error
Browse files Browse the repository at this point in the history
  • Loading branch information
binsee committed Oct 7, 2017
1 parent 7b2833e commit 8e1546d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ function getAuthUrl(appid, redirect_uri, state, scope) {
state = state || uuid.v1()

url.searchParams.set('appid', appid)
url.searchParams.set('redirect_uri', encodeURIComponent(redirect_uri))
url.searchParams.set('scope', scope || 'snsapi_base ')
url.searchParams.set('redirect_uri', redirect_uri)
url.searchParams.set('scope', scope || 'snsapi_base')
url.searchParams.set('state', state)
return { url: url.toString(), state }
}
Expand Down

0 comments on commit 8e1546d

Please sign in to comment.