fix redirect url

This commit is contained in:
2024-05-14 23:29:58 +02:00
parent 2c6b21fa77
commit 741286f773
2 changed files with 8 additions and 5 deletions

View File

@@ -6,16 +6,19 @@ import { browser } from '$app/environment';
let userManager: UserManager;
if (browser) {
const host_url = window.location.href.startsWith('http://')
? 'http://'
: 'https://' + window.location.hostname;
const config = {
authority: PUBLIC_ISSUER, // At Zitadel Project Console > [Your project] > [Your application] > URLs - Issuer
client_id: PUBLIC_ZITADEL_CLIENT_ID, // At Zitadel Project Console > [Your project] > [Your application] > Configuration - Client ID
redirect_uri: window.location.hostname + '/callback', // At Zitadel Project Console > [Your project] > [Your application] > URLs - Login Redirect URI
redirect_uri: host_url + '/callback', // At Zitadel Project Console > [Your project] > [Your application] > URLs - Login Redirect URI
response_type: 'code',
scope: 'openid profile email',
post_logout_redirect_uri: window.location.hostname,
post_logout_redirect_uri: host_url,
userStore: new WebStorageStateStore({ store: window.localStorage }),
automaticSilentRenew: true,
silent_redirect_uri: window.location.hostname + '/silent-refresh'
silent_redirect_uri: host_url + '/silent-refresh'
};
userManager = new UserManager(config);

View File

@@ -14,8 +14,8 @@
import AddFamilyMember from '$lib/family_tree/AddFamilyMember.svelte';
import CreateProfile from '$lib/family_tree/CreateProfile.svelte';
let relationshipPanel: string;
let AddFamilyMemberPanel: string;
let relationshipPanel = '';
let AddFamilyMemberPanel = '';
let CreateProfilePanel = false;
const nodes = writable<Node[]>([]);