Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
sameSite cookie
Browse files
src/lib/components/sidebar/Sidebar.svelte
CHANGED
@@ -75,7 +75,7 @@
|
|
75 |
{#if user?.picture}
|
76 |
<footer class="text-white text-center text-base pb-8 px-8 flex items-center justify-between gap-4">
|
77 |
<div class="flex items-center justify-start gap-4">
|
78 |
-
<img src={user.picture} alt="User avatar" class="w-10 h-10 rounded-full border-2 border-white inline-block" />
|
79 |
<div class="w-full text-left">
|
80 |
<p class="text-lg font-semibold">
|
81 |
{user.name}
|
|
|
75 |
{#if user?.picture}
|
76 |
<footer class="text-white text-center text-base pb-8 px-8 flex items-center justify-between gap-4">
|
77 |
<div class="flex items-center justify-start gap-4">
|
78 |
+
<img src={user?.picture?.startsWith('http') ? user?.picture : `https://huggingface.co${user?.picture}`} alt="User avatar" class="w-10 h-10 rounded-full border-2 border-white inline-block" />
|
79 |
<div class="w-full text-left">
|
80 |
<p class="text-lg font-semibold">
|
81 |
{user.name}
|
src/routes/login/callback/+page.svelte
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
export let data;
|
6 |
|
7 |
if (data?.token) {
|
8 |
-
cookies.set('hf_access_token', data.token, { expires: 7 });
|
9 |
if (browser) {
|
10 |
window.location.href = '/';
|
11 |
}
|
|
|
5 |
export let data;
|
6 |
|
7 |
if (data?.token) {
|
8 |
+
cookies.set('hf_access_token', data.token, { expires: 7, sameSite: 'none', secure: true });
|
9 |
if (browser) {
|
10 |
window.location.href = '/';
|
11 |
}
|