Back to Next Auth

README

apps/examples/solid-start/README.md

4.2.12.6 KB
Original Source

The example repository is maintained from a monorepo. Pull Requests should be opened against nextauthjs/next-auth.

<p align="center"> <a href="https://authjs.dev" target="_blank"> </a> <a href="https://start.solidjs.com" target="_blank"> </a> <h3 align="center"><b>SolidStart Auth</b> - Example App</h3> <p align="center"> Open Source. Full Stack. Own Your Data. </p> <p align="center" style="align: center;"> <a href="https://npm.im/@auth/solid-start">
  </a>
  <a href="https://bundlephobia.com/result?p=@auth/solid-start">
    
  </a>
  <a href="https://www.npmtrends.com/@auth/solid-start">
    
  </a>
  <a href="https://npm.im/@auth/solid-start">
    
  </a>
</p> </p>

Overview

This is the official SolidStart Auth example for Auth.js.

Getting started

You can follow the guide below, or click the following button to deploy this example to Vercel.

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.