Skip to content

Commit

Permalink
style: cleaning code
Browse files Browse the repository at this point in the history
  • Loading branch information
kimlimjustin committed Jun 17, 2024
1 parent 908e799 commit f3a5ee4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions src/routes/auth/v1/account/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@
localStorage.setItem(PKCE_VERIFIER, verifier);
const nonce = getKey(24);
const s = 'account';
const redirect_uri = `${window.location.origin}/auth/v1/oidc/callback`
.replaceAll(':', '%3A')
.replaceAll('/', '%2F');
const redirect_uri = encodeURIComponent(`${window.location.origin}/auth/v1/oidc/callback`);
window.location.href = `/auth/v1/oidc/logout?post_logout_redirect_uri=%2Fauth%2Fv1%2Foidc%2Fauthorize%3Fclient_id%3Drauthy%26redirect_uri%3D${redirect_uri}%26response_type%3Dcode%26code_challenge%3D${challenge}%26code_challenge_method%3DS256%26scope%3Dopenid%2Bprofile%2Bemail%26nonce%3D${nonce}%26state%3D${s}`;
}
});
Expand Down
1 change: 0 additions & 1 deletion src/routes/auth/v1/oidc/logout/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
onMount(async () => {
const url = new URL(window.location.href);
const postLogoutUri = decodeURIComponent(url.searchParams.get('post_logout_redirect_uri') || '/');
console.log(postLogoutUri)
const token = url.searchParams.get('id_token_hint');
const state = url.searchParams.get('state');
Expand Down

0 comments on commit f3a5ee4

Please sign in to comment.