This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { fail, redirect } from "@sveltejs/kit"; | |
import type { Actions } from "./$types"; | |
import type { AuthError, Provider } from "@supabase/supabase-js"; | |
import supabase from "$lib/db"; | |
export const actions: Actions = { | |
login: async (event) => { | |
const provider = event.url.searchParams.get("provider") as Provider; | |
// No provider means we're using the email/password in the body to log in. | |
if (!provider) { |