https://github.com/nextauthjs/solid-start-auth-example
Example showing how to use Auth.js with SolidStart.
https://github.com/nextauthjs/solid-start-auth-example
authjs solidstart
Last synced: 3 months ago
JSON representation
Example showing how to use Auth.js with SolidStart.
- Host: GitHub
- URL: https://github.com/nextauthjs/solid-start-auth-example
- Owner: nextauthjs
- License: isc
- Created: 2022-12-18T01:19:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-27T09:00:33.000Z (4 months ago)
- Last Synced: 2025-03-22T11:51:10.621Z (3 months ago)
- Topics: authjs, solidstart
- Language: TypeScript
- Homepage: https://solid-start-auth-example.vercel.app
- Size: 227 KB
- Stars: 25
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
> The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/examples/solid-start). Pull Requests should be opened against [`nextauthjs/next-auth`](https://github.com/nextauthjs/next-auth).
SolidStart Auth - Example App
Open Source. Full Stack. Own Your Data.
## Overview
This is the official SolidStart Auth example for [Auth.js](https://authjs.dev).
## Getting started
You can follow the guide below, or click the following button to deploy this example to [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=solid-start-auth-example).
[](https://vercel.com/new/git/external?repository-url=https://github.com/nextauthjs/solid-start-auth-example&project-name=solid-start-auth-example&repository-name=solid-start-auth-example)
### Installing
```sh
pnpm add -D solid-start-vercel
``````sh
npm i -D solid-start-vercel
``````sh
yarn add -D solid-start-vercel
```### Adding to Vite config
```ts
import solid from "solid-start/vite"
import dotenv from "dotenv"
import { defineConfig } from "vite"
// @ts-expect-error no typing
import vercel from "solid-start-vercel"export default defineConfig(() => {
dotenv.config()
return {
plugins: [solid({ ssr: true, adapter: vercel({ edge: false }) })],
}
})
```### Environment Variables
- `ENABLE_VC_BUILD`=`1` .
### Finishing up
Create a GitHub repo and push the code to it, then deploy it to Vercel.
## Acknowledgements
Thanks to Vercel sponsoring this project by allowing it to be deployed for free for the entire Auth.js Team