Skip to content

Commit 02a1d88

Browse files
committed
Fixed login
1 parent 7a8efa1 commit 02a1d88

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/user.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ export async function initUser() {
1818
}
1919

2020
export async function login(){
21-
const url = new URL(window.location.toString())
22-
url.pathname = '/logged_in.html'
23-
24-
new IAOauth('yio57t9r9tsgmmf')
21+
const re = new IAOauth('yio57t9r9tsgmmf')
2522
.addScope("user:read")
2623
.addScope("pastefy|pastes")
2724
.addScope("pastefy|folders")
2825
.addScope("pastefy|notifications")
2926
.setState(window.location.toString())
30-
.setRedirect(url.toString())
27+
28+
const url = new URL(window.location.toString())
29+
url.pathname = '/logged_in.html'
30+
url.search = ''
31+
url.hash = ''
32+
re.setRedirect(url.toString())
3133
.open()
3234
}

0 commit comments

Comments
 (0)