Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.59 KB

File metadata and controls

39 lines (25 loc) · 1.59 KB

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