A long-titled repository showing how you could potentially use SvelteKit deployed to Netlify with Google OAuth for authentication. Not the only way or perhaps even the best way, but a way.
http://localhost:3000/auth/callback
..env.sample
to .env
node -p "require('crypto').randomBytes(64).toString('hex');"
AUTHORIZED_DOMAIN
to restrict authentication to only this domain.npm install
npm run dev
https://my-netlify-app-name.netlify.app/auth/callback
.NODE_ENV=production
and AUTH_REDIRECT=https://my-netlify-app-name.netlify.app/auth/callback
.Thanks to a few different articles and authors for inspiration and help.