mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-12 13:53:03 -05:00
feat: test-auth
This commit is contained in:
11
docs/src/pages/auth/authorize.js
Normal file
11
docs/src/pages/auth/authorize.js
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user