Skip to content

Commit

Permalink
fix(frontend): fix request display
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Urban committed Apr 11, 2024
1 parent f62dc85 commit 47ca00d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion frontend/Request.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<script>
import { onMount } from 'svelte';
let redirectURL = '';
function getCookie(name) {
let cookieArray = document.cookie.split(';');
for (let i = 0; i < cookieArray.length; i++) {
let cookiePair = cookieArray[i].split('=');
if (name === cookiePair[0].trim()) {
return decodeURIComponent(cookiePair[1]);
}
}
return null;
}
onMount(() => {
// Extract the redirect URL from the query parameters
Expand All @@ -27,6 +37,6 @@

<div class="container mt-5">
<h3>Request Access</h3>
<p>You are trying to access: <strong>{redirectURL}</strong></p>
<p>You are trying to access: <strong>{getCookie('X-Auth-Site')}</strong></p>
<button class="btn btn-primary" on:click={requestAccess}>Request Access</button>
</div>

0 comments on commit 47ca00d

Please sign in to comment.