mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-03-31 11:46:37 +00:00
initial commit
This commit is contained in:
16
frontend/src/routes/authorize/+page.server.ts
Normal file
16
frontend/src/routes/authorize/+page.server.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import OidcService from '$lib/services/oidc-service';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load: PageServerLoad = async ({ url, cookies }) => {
|
||||
const clientId = url.searchParams.get('client_id');
|
||||
const oidcService = new OidcService(cookies.get('access_token'));
|
||||
|
||||
const client = await oidcService.getClient(clientId!);
|
||||
|
||||
return {
|
||||
scope: url.searchParams.get('scope')!,
|
||||
nonce: url.searchParams.get('nonce') || undefined,
|
||||
state: url.searchParams.get('state')!,
|
||||
client
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user