From 5aa893d26e1a523c9ccf522e7c0937aa6bd5eec2 Mon Sep 17 00:00:00 2001 From: Twilight Date: Tue, 10 Sep 2024 16:49:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/auth/login.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pages/auth/login.vue b/src/pages/auth/login.vue index 6dc04f2..6380ae4 100644 --- a/src/pages/auth/login.vue +++ b/src/pages/auth/login.vue @@ -24,7 +24,7 @@ function generateRandomString(length: number) { async function generateCodeChallenge(codeVerifier: string) { const digest = await crypto.subtle.digest( "SHA-256", - new TextEncoder().encode(codeVerifier), + new TextEncoder().encode(codeVerifier) ); return btoa(String.fromCharCode(...new Uint8Array(digest))) @@ -49,10 +49,9 @@ async function go() { const discovery = await axios.get(config.oauth_discovery_url); - const a = document.createElement('a') - a.href = discovery.data.authorization_endpoint + '?' + query - a.click() - + const a = document.createElement("a"); + a.href = discovery.data.authorization_endpoint + "?" + query; + a.click(); } go();