mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-03-24 17:00:06 +00:00
refactor!: serve the static frontend trough the backend (#520)
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
19
frontend/src/routes/authorize/+page.ts
Normal file
19
frontend/src/routes/authorize/+page.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import OidcService from '$lib/services/oidc-service';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async ({ url }) => {
|
||||
const clientId = url.searchParams.get('client_id');
|
||||
const oidcService = new OidcService();
|
||||
|
||||
const client = await oidcService.getClientMetaData(clientId!);
|
||||
|
||||
return {
|
||||
scope: url.searchParams.get('scope')!,
|
||||
nonce: url.searchParams.get('nonce') || undefined,
|
||||
state: url.searchParams.get('state')!,
|
||||
callbackURL: url.searchParams.get('redirect_uri')!,
|
||||
client,
|
||||
codeChallenge: url.searchParams.get('code_challenge')!,
|
||||
codeChallengeMethod: url.searchParams.get('code_challenge_method')!
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user