There was an error while loading. Please reload this page.
1 parent c467589 commit 722ccc0Copy full SHA for 722ccc0
docs/src/pages/auth/authorize.js
@@ -8,11 +8,13 @@ export async function GET({url, redirect}) {
8
9
const myUrl = new URL(url);
10
const params = new URLSearchParams(myUrl.search);
11
- const redirect_uri = params.get('redirect_uri');
+ const redirectUrl = params.get('redirect_uri');
12
13
const { GITHUB_CLIENT_ID } = import.meta.env;
14
15
- const state = toHexString(redirect_uri);
+
16
+ const redirect_uri = `${myUrl.origin}/auth/authorized`
17
+ const state = toHexString(redirectUrl);
18
19
const oauthParams = new URLSearchParams({ client_id:GITHUB_CLIENT_ID , redirect_uri, state });
20
return redirect(`${GITHUB_OAUTH_AUTHORIZE_URL}?${oauthParams}`, 302)
0 commit comments