# Get the project.
git clone git@github.com:michaelcuneo/sveltekit-sst-auth.git
cd sveltekit-sst-auth
npm install
npx sst dev
# In another terminal.
cd packages/sveltekit
npm run dev
npx sst secrets set [environment-variable] ["value"]
If you want to run MagicLinks auth, add email secrets for the NODE_MAILER CONFIG If you want to run Federated Identities, add secrets for the GOOGLE, and/or META CONFIG.
for the default stage you're in
npx sst secrets set EMAIL_SERVICE "Gmail"
npx sst secrets --stage production set EMAIL_SERVICE "Gmail"
# NODE_MAILER CONFIG FOR MAGIC LINKS
EMAIL_SERVICE="Gmail"
EMAIL_HOST="smtp.gmail.com"
EMAIL_PORT="465"
EMAIL_USER="user@gmail.com"
EMAIL_APP_PASS="abcd efgh ijkl mnop"
# GOOGLE CONFIG FOR GOOGLE FEDERATED IDENTITY
GOOGLE_CLIENT_ID="#####-#######.apps.googleusercontent.com"
# META CONFIG FOR META FEDERATED IDENTITY
FACEBOOK_APP_ID="123456789101212131"
FACEBOOK_SECRET="abcd efgh ijkl mnop"
# GITHUB CONFIG FOR GITHUB FEDERATED IDENTITY
GITHUB_CLIENT_ID="123456789"
GITHUB_CLIENT_SECRET="abcd efgh ijkl mnop"
PROJECT_NAME="SvelteKit SST Auth"
DEV_DOMAIN_NAME="https://localhost:3000"
PROD_DOMAIN_NAME="https://skits.michaelcuneo.com.au"
HOSTED_ZONE_NAME="michaelcuneo.com.au"
API_DOMAIN_NAME="https://skitsapi.michaelcuneo.com.au"
VERSION="1.0.0"
sst.config.ts
and
stacks/SSTAuthStack.ts
to suit your own purposes.
The things you might want to change here are the region, the project name, the stages, edge, etc
Speaking of profit, if you really really like what I've done here and it has helped you in some way towards making a better authentication service for your projects, feel free to donate to my beer and coffee allowance, here's my