Skip to content

AlexErrant/SolidStart_AuthJs_CloudflareWorkers

Repository files navigation

This repo demos how to get Auth.js working with SolidStart via Create JD App on Cloudflare Workers. Things are a bit different with Cloudflare because they don't use the process.env to inject environment variables. Commits to this repo were more or less "atomic", so feel free to step through them.

Start Dev Server

Run cp .env.example .env then update the values after visiting https://discord.com/developers/applications > Oauth2 to get the clientId & clientSecret. Generate AUTH_SECRET with openssl rand -hex 32

npm run dev

This will start a dev server on port 3000 and will watch for changes.

Go to https://discord.com/developers/applications > Oauth2 then add http://127.0.0.1:3000/api/auth/callback/discord to Redirects. You should be able to sign in at http://127.0.0.1:3000

Testing Production Build

Build

npm run build

Start

npm run start

This will start a production server on port 3000.

Deploy

Sponsor Create JD App

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published