feat: test-auth

This commit is contained in:
thomas
2024-03-28 21:39:55 +01:00
parent e8ecec98f0
commit 990e173d67
8 changed files with 132 additions and 15 deletions

View File

@@ -0,0 +1,11 @@
const GITHUB_OAUTH_AUTHORIZE_URL = 'https://github.com/login/oauth/authorize';
export async function GET({params, redirect}) {
console.log('Authorize request', params);
const redirect_uri = 'http://localhost:4321/auth/localized'
const oauthParams = new URLSearchParams({ client_id:'Iv1.711903007f608691' , redirect_uri, state: 'lqsksqd' });
return redirect(`${GITHUB_OAUTH_AUTHORIZE_URL}?${oauthParams}`, 302)
}