Skip to content

Commit

Permalink
don't cache magic link req
Browse files Browse the repository at this point in the history
  • Loading branch information
jho44 authored and lilith committed Sep 4, 2023
1 parent f3e5996 commit 428b1b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/routes/login/[phone]/[token]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { PageServerLoad } from './$types';
import { redirect } from '@sveltejs/kit';
import prisma from '$lib/prisma';

export const load = (async ({ params, cookies }) => {
export const load = (async ({ params, cookies, setHeaders }) => {
console.log('LOAD LOGIN');
let magicLinkInfo;
try {
Expand Down Expand Up @@ -59,5 +59,9 @@ export const load = (async ({ params, cookies }) => {
});
console.log('CREATED SESSION', session);

setHeaders({
'cache-control': 'no-store, max-age=0'
});

throw redirect(308, '/dashboard');
}) satisfies PageServerLoad;

0 comments on commit 428b1b1

Please sign in to comment.