Skip to content

Commit 833db31

Browse files
committed
ignore code in callback url
1 parent 5bf3e9d commit 833db31

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/comments.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@ class Comments {
9393
const code = query.code
9494
delete query.code
9595
const search = Query.stringify(query)
96-
history.replaceState({}, '', `${window.location.origin}${window.location.pathname}${search}${window.location.hash}`)
96+
const replacedUrl = `${window.location.origin}${window.location.pathname}${search}${window.location.hash}`
97+
history.replaceState({}, '', replacedUrl)
98+
99+
Object.assign(this, {
100+
id: replacedUrl,
101+
link: replacedUrl,
102+
}, options)
97103

98104
this.state.user.loginning = true
99105
http.post('https://gh-oauth.imsun.net', {

0 commit comments

Comments
 (0)