Skip to content

Instantly share code, notes, and snippets.

@claughinghouse
claughinghouse / functions_src_auth.ts
Created November 28, 2023 19:32
SvelteKit and SST Auth
# This file is in the sveltekit parent directory and is a seperate stack for SST.
import { Account } from "@rebut/core/account";
import { Config } from "sst/node/config";
import { AuthHandler, GoogleAdapter } from "sst/node/future/auth";
import { sessions } from "./sessions";
export const handler = AuthHandler({
sessions,
providers: {
@claughinghouse
claughinghouse / auth.ts
Created July 9, 2024 22:00
auth.ts sstv2
import { useCookie, useQueryParam, useResponse } from "sst/node/api";
import { Config } from "sst/node/config";
import { AuthHandler, GoogleAdapter } from "sst/node/future/auth";
import { User } from "@strdb/core/user";
declare module "sst/node/future/auth" {
export interface SessionTypes {
user: {
userID: string;