Skip to content

Commit

Permalink
Fixed login
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianFun123 committed Mar 10, 2024
1 parent 7a8efa1 commit 02a1d88
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ export async function initUser() {
}

export async function login(){
const url = new URL(window.location.toString())
url.pathname = '/logged_in.html'

new IAOauth('yio57t9r9tsgmmf')
const re = new IAOauth('yio57t9r9tsgmmf')
.addScope("user:read")
.addScope("pastefy|pastes")
.addScope("pastefy|folders")
.addScope("pastefy|notifications")
.setState(window.location.toString())
.setRedirect(url.toString())

const url = new URL(window.location.toString())
url.pathname = '/logged_in.html'
url.search = ''
url.hash = ''
re.setRedirect(url.toString())
.open()
}

0 comments on commit 02a1d88

Please sign in to comment.