From 49a43f0698fbab50ddbb3db90b984f2e584bc5b3 Mon Sep 17 00:00:00 2001 From: bat Date: Tue, 30 May 2023 05:47:29 +0000 Subject: [PATCH] get redirect to OAuth login showing authorization screen --- auth.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auth.js b/auth.js index d3c4d0f..3619ced 100644 --- a/auth.js +++ b/auth.js @@ -26,7 +26,7 @@ export class Auth { search.set('client_id', this.giteaClientId) search.set( 'redirect_uri', - this.remoteBaseUrl + '/auth/callback' + this.remoteBaseUrl + '/api/auth/callback' ) search.set('state', state) url.search = search.toString() @@ -50,9 +50,9 @@ export class Auth { name: 'oauth.gitea.state', value: state, }) - return new Response('', { + event.respondWith(new Response('', { headers, status: 302, - }) + })) } } \ No newline at end of file