Mobile support to come.
Feb 7
wip - wire up our user dto creation
baepaul•11:41 PM
making signup form also work without js, minimal as is
baepaul•10:47 PM
refactoring validate user -> hasUser and wiring up signup form
baepaul•10:33 PM
updating sign up to use signin with otp instead
baepaul•5:25 PM
migration to disable creating user on auth user
baepaul•4:47 PM
Feb 6
for the subways
baepaul•11:10 PM
deleted unused import
mikkel•8:28 PM
chained user router
mikkel•8:26 PM
refactoring to head -> /user/{username} for username existence checks
baepaul•8:23 PM
a lot of footguns eh
baepaul•7:49 PM
updated public url to include www
mikkel•8:00 PM
wired up commit service in backend
mikkel•7:18 PM
added commit repo and service
mikkel•7:14 PM
created commits table
mikkel•7:05 PM
Feb 5
removed unnecessary envs
mikkel•9:55 PM
replaced create_user api with validate_name api
mikkel•9:54 PM
created temporary signup page
mikkel•8:37 PM
fixed sending request to wrong url
mikkel•7:51 PM
Feb 3
added reserved user names to avoid
mikkel•9:53 PM
implemented create user endpoint
mikkel•6:24 AM
created supabase client
mikkel•5:18 AM
updated server url in cli to gitdot.io
mikkel•4:54 AM
enabled git ops directly via gitdot.io
mikkel•4:52 AM
making commit.author work with legacy commit stats apis
baepaul•12:21 AM
updated commits api to return gitdot user info if exist
mikkel•12:01 AM
Feb 2
enabling dark mode based on system preference for blog & landing page only
baepaul•10:41 PM
sorting entries
baepaul•10:15 PM
explaining my sins
baepaul•9:33 PM
doing something risky and ill-advised :)
baepaul•9:13 PM
updated preview to only return blobs
mikkel•8:14 PM
baepaul•Feb 07, 2026 11:41:24 PM
wip - wire up our user dto creation
5 files changed
1import type { EmailOtpType } from "@supabase/supabase-js";2import { redirect } from "next/navigation";3import type { NextRequest } from "next/server";..4import { createSupabaseClient } from "@/lib/supabase";56/**7 * a public GET endpoint that is linked to by the supabase email confirmation linked
1import type { EmailOtpType } from "@supabase/supabase-js";2import { redirect } from "next/navigation";3import type { NextRequest } from "next/server";4import { createUser } from "@/lib/dal";5import { createSupabaseClient } from "@/lib/supabase";67/**8 * a public GET endpoint that is linked to by the supabase email confirmation linked
12 const token_hash = searchParams.get("token_hash");13 const type = searchParams.get("type") as EmailOtpType | null;14 const next = searchParams.get("next") ?? "/";1516 if (token_hash && type) {17 const supabase = await createSupabaseClient();1819 // this call invokes _saveSession and sets cookies20 const { error } = await supabase.auth.verifyOtp({ type, token_hash });..............2122 // redirects preserve cookies23 if (!error) {24 redirect(next);25 }26 }2728 redirect("/error");
11export async function GET(request: NextRequest) {12 const { searchParams } = new URL(request.url);13 const token_hash = searchParams.get("token_hash");1415 if (token_hash) {....16 const supabase = await createSupabaseClient();17 const { data, error } = await supabase.auth.verifyOtp({ type: "email", token_hash });1819 // redirects preserve cookies20 if (!error) {21 const username = data.user?.user_metadata?.username;2223 // TODO: technically possible user name was claimed by another user between email confirmation delays24 // should show some error and let user select another username25 if (username) {26 await createUser(username);27 }28 redirect("/onboarding");29 }30 }3132 redirect("/error");
1export default function Page() {
2 return (
3 <div className="max-w-3xl mx-auto flex gap-4 items-center justify-center h-screen">
4 <div className="flex flex-col text-sm w-sm">
5 <p>Welcome to gitdot.</p>
6 <p className="text-primary/60">
7 Here's a few short onboarding things, basically just profile pic eh.
8 and some prompt for github?
9 </p>
10 <p>
11 For now let users set password
12 </p>
13 </div>
14 </div>
15 );
16}
1777 }7879 const { error } = await supabase.auth.signInWithOtp({80 email,81 options: { shouldCreateUser: true },82 });8384 if (error) return { error: error.message };85 if (redirectTo) redirect(redirectTo);
80 // we don't differentiate between new and existing for security: otherwise attackers would be able to tell what81 // user exists / doesn't exist82 const { error } = await supabase.auth.signInWithOtp({83 email,84 options: { shouldCreateUser: true, data: { username } },85 });8687 if (error) return { error: error.message };88 if (redirectTo) redirect(redirectTo);
loading...