From 02a1d88232dabb57d87d7febab39b1a111c56be0 Mon Sep 17 00:00:00 2001 From: juliangojani Date: Sun, 10 Mar 2024 18:03:59 +0100 Subject: [PATCH] Fixed login --- src/user.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/user.ts b/src/user.ts index ca1a302..8296e55 100644 --- a/src/user.ts +++ b/src/user.ts @@ -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() } \ No newline at end of file