mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-03 08:19:04 +02:00
Merge remote-tracking branch 'origin/main' into feat/huma-api-docs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pocket-id-frontend",
|
||||
"version": "2.10.0",
|
||||
"version": "2.11.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@opentelemetry/api": "^1.9.1",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.219.0",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.220.0",
|
||||
"@opentelemetry/resources": "^2.8.0",
|
||||
"@opentelemetry/sdk-trace-web": "^2.8.0",
|
||||
"@opentelemetry/semantic-conventions": "^1.41.1",
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
</div>
|
||||
{:else}
|
||||
<div
|
||||
class="flex h-screen items-center justify-center bg-cover bg-center text-center"
|
||||
class="flex min-h-dvh items-center justify-center bg-cover bg-center text-center"
|
||||
style="background-image: url({cachedBackgroundImage.getUrl()});"
|
||||
>
|
||||
<Card.Root
|
||||
|
||||
@@ -172,6 +172,7 @@
|
||||
id="signup-token-list"
|
||||
withoutSearch={true}
|
||||
fetchCallback={userService.listSignupTokens}
|
||||
defaultSort={{ column: 'createdAt', direction: 'asc' }}
|
||||
bind:this={tableRef}
|
||||
{columns}
|
||||
{actions}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
function onTabChange(newValue: string) {
|
||||
if (useHash && page.url.hash !== newValue) {
|
||||
window.location.hash = newValue;
|
||||
history.replaceState(history.state, "",location.pathname + location.search + `#${newValue}`);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -22,6 +22,15 @@ export type OidcClientCredentials = {
|
||||
federatedIdentities: OidcClientFederatedIdentity[];
|
||||
};
|
||||
|
||||
export type OidcDiscoveryConfiguration = {
|
||||
issuer: string;
|
||||
authorization_endpoint: string;
|
||||
token_endpoint: string;
|
||||
userinfo_endpoint: string;
|
||||
end_session_endpoint: string;
|
||||
jwks_uri: string;
|
||||
};
|
||||
|
||||
export type OidcClient = OidcClientMetaData & {
|
||||
callbackURLs: string[];
|
||||
logoutCallbackURLs: string[];
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { beforeNavigate } from '$app/navigation';
|
||||
import { page } from '$app/state';
|
||||
import { openConfirmDialog } from '$lib/components/confirm-dialog';
|
||||
import CopyToClipboard from '$lib/components/copy-to-clipboard.svelte';
|
||||
import FormattedMessage from '$lib/components/formatted-message.svelte';
|
||||
@@ -47,13 +46,13 @@
|
||||
const backNavigation = backNavigate('/settings/admin/oidc-clients');
|
||||
|
||||
const setupDetails = $state({
|
||||
[m.issuer_url()]: `https://${page.url.host}`,
|
||||
[m.authorization_url()]: `https://${page.url.host}/authorize`,
|
||||
[m.oidc_discovery_url()]: `https://${page.url.host}/.well-known/openid-configuration`,
|
||||
[m.token_url()]: `https://${page.url.host}/api/oidc/token`,
|
||||
[m.userinfo_url()]: `https://${page.url.host}/api/oidc/userinfo`,
|
||||
[m.logout_url()]: `https://${page.url.host}/api/oidc/end-session`,
|
||||
[m.certificate_url()]: `https://${page.url.host}/.well-known/jwks.json`,
|
||||
[m.issuer_url()]: data.oidcConfiguration.issuer,
|
||||
[m.authorization_url()]: data.oidcConfiguration.authorization_endpoint,
|
||||
[m.oidc_discovery_url()]: `${data.oidcConfiguration.issuer}/.well-known/openid-configuration`,
|
||||
[m.token_url()]: data.oidcConfiguration.token_endpoint,
|
||||
[m.userinfo_url()]: data.oidcConfiguration.userinfo_endpoint,
|
||||
[m.logout_url()]: data.oidcConfiguration.end_session_endpoint,
|
||||
[m.certificate_url()]: data.oidcConfiguration.jwks_uri,
|
||||
[m.pkce()]: client.pkceEnabled ? m.enabled() : m.disabled(),
|
||||
[m.requires_reauthentication()]: client.requiresReauthentication ? m.enabled() : m.disabled(),
|
||||
[m.requires_pushed_authorization_requests()]: client.requiresPushedAuthorizationRequests
|
||||
|
||||
@@ -1,16 +1,28 @@
|
||||
import OidcService from '$lib/services/oidc-service';
|
||||
import type { OidcDiscoveryConfiguration } from '$lib/types/oidc.type';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async ({ params }) => {
|
||||
export const load: PageLoad = async ({ fetch, params }) => {
|
||||
const oidcService = new OidcService();
|
||||
|
||||
const client = await oidcService.getClient(params.id);
|
||||
const scimServiceProvider = await oidcService
|
||||
const clientPromise = oidcService.getClient(params.id);
|
||||
const scimServiceProviderPromise = oidcService
|
||||
.getScimResourceProvider(params.id)
|
||||
.then((p) => p)
|
||||
.catch(() => undefined);
|
||||
const oidcConfigurationPromise = fetch('/.well-known/openid-configuration').then(
|
||||
(response) => response.json() as Promise<OidcDiscoveryConfiguration>
|
||||
);
|
||||
|
||||
const [client, scimServiceProvider, oidcConfiguration] = await Promise.all([
|
||||
clientPromise,
|
||||
scimServiceProviderPromise,
|
||||
oidcConfigurationPromise
|
||||
]);
|
||||
|
||||
return {
|
||||
client,
|
||||
scimServiceProvider
|
||||
scimServiceProvider,
|
||||
oidcConfiguration
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user