Skip to content

Commit

Permalink
docs: update framework READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Jun 20, 2024
1 parent c860025 commit a6b3364
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 176 deletions.
68 changes: 30 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,12 @@
<p align="center">Authentication for the Web.</p>
<p align="center">Open Source. Full Stack. Own Your Data.</p>
<p align="center" style="align: center;">
<a href="https://npm.im/@auth/core">
<img src="https://img.shields.io/badge/TypeScript-blue?style=flat-square" alt="TypeScript" />
</a>
<a href="https://www.npmtrends.com/next-auth">
<img src="https://img.shields.io/npm/dm/next-auth?style=flat-square" alt="Downloads" />
</a>
<a href="https://github.com/nextauthjs/next-auth/stargazers">
<img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square" alt="GitHub Stars" />
</a>
<a href="https://www.npmjs.com/package/next-auth">
<img src="https://img.shields.io/github/v/release/nextauthjs/next-auth?label=latest&style=flat-square" alt="GitHub Stable Release" />
</a>
<a href="https://codecov.io/gh/nextauthjs/next-auth" >
<img alt="Codecov" src="https://img.shields.io/codecov/c/github/nextauthjs/next-auth?token=o2KN5GrPsY&style=flat-square&logo=codecov">
</a>
<a href="https://github.com/nextauthjs/next-auth/releases"><img src="https://img.shields.io/github/v/release/nextauthjs/next-auth?style=flat-square&label=latest%20release&color=purple" alt="GitHub Stable Release" /></a>
<!-- TODO: Should count `@auth/core` when NextAuth.js v5 is released as stable. -->
<a href="https://www.npmtrends.com/next-auth"><img src="https://img.shields.io/npm/dm/next-auth?style=flat-square&color=cyan" alt="Downloads" /></a>
<a href="https://github.com/nextauthjs/next-auth/stargazers"><img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square&color=orange" alt="Github Stars" /></a>
<a href="https://codecov.io/gh/nextauthjs/next-auth" ><img alt="Codecov" src="https://img.shields.io/codecov/c/github/nextauthjs/next-auth?token=o2KN5GrPsY&style=flat-square&logo=codecov"></a>
<img src="https://shields.io/badge/TypeScript-3178C6?logo=TypeScript&logoColor=fff&style=flat-square" alt="TypeScript" />
</p>
<p align="center">
Auth.js is a set of open-source packages that are built on standard Web APIs for authentication in modern applications with any framework on any platform in any JS runtime.
Expand All @@ -43,15 +34,16 @@
- Designed to work with any OAuth service, it supports 2.0+, OIDC
- Built-in support for [many popular sign-in services](https://github.com/nextauthjs/next-auth/tree/main/packages/core/src/providers)
- Email/Passwordless authentication
- Passkeys/WebAuthn support
- Bring Your Database - or none! - stateless authentication with any backend (Active Directory, LDAP, etc.)
- Runtime-agnostic, runs anywhere! (Vercel Edge Functions, Node.js, Serverless, etc.)
- Runtime-agnostic, runs anywhere! (Docker, Node.js, Serverless, etc.)

### Own your data

Auth.js can be used with or without a database.

- An open-source solution that allows you to keep control of your data
- Built-in support for [MySQL, MariaDB, Postgres, Microsoft SQL Server, MongoDB, SQLite, etc.](https://adapters.authjs.dev)
- Built-in support for [MySQL, MariaDB, Postgres, Microsoft SQL Server, MongoDB, SQLite, GraphQL, etc.](https://adapters.authjs.dev)
- Works great with databases from popular hosting providers

### Secure by default
Expand Down Expand Up @@ -95,97 +87,97 @@ We have an [OpenCollective](https://opencollective.com/nextauth) for companies a
<tr>
<td align="center" valign="top">
<a href="https://clerk.com?utm_source=sponsorship&utm_medium=github&utm_campaign=authjs&utm_content=sponsor" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/49538330?s=200&v=4" alt="Clerk Logo" />
<img height="96" src="https://avatars.githubusercontent.com/u/49538330?s=200&v=4" alt="Clerk Logo" />
</a><br />
<div>Clerk</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://fusionauth.io" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/41974756?s=200&v=4" alt="FusionAuth Logo" />
<img height="96" src="https://avatars.githubusercontent.com/u/41974756?s=200&v=4" alt="FusionAuth Logo" />
</a><br />
<div>FusionAuth</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://www.beyondidentity.com" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/69811361?s=200&v=4" alt="Beyond Identity Logo" />
<img height="96" src="https://avatars.githubusercontent.com/u/69811361?s=200&v=4" alt="Beyond Identity Logo" />
</a><br />
<div>Beyond Identity</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://stytch.com" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/69983493?s=200&v=4" alt="Stytch Logo" />
<img height="96" src="https://avatars.githubusercontent.com/u/69983493?s=200&v=4" alt="Stytch Logo" />
</a><br />
<div>Stytch</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://prisma.io" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/17219288?s=200&v=4" alt="Prisma Logo" />
<img height="96" src="https://avatars.githubusercontent.com/u/17219288?s=200&v=4" alt="Prisma Logo" />
</a><br />
<div>Prisma</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://lowdefy.com" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/47087496?s=200&v=4" alt="Lowdefy Logo" />
<img height="96" src="https://avatars.githubusercontent.com/u/47087496?s=200&v=4" alt="Lowdefy Logo" />
</a><br />
<div>Lowdefy</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://vercel.com" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/14985020?s=200&v=4" alt="Vercel Logo" />
</a><br />
<div>Vercel</div>
<sub>💵☁️</sub>
</td>
</tr>
<tr>
<td align="center" valign="top">
<a href="https://www.descope.com" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/97479186?s=200&v=4" alt="Descope Logo" />
<img height="96" src="https://avatars.githubusercontent.com/u/97479186?s=200&v=4" alt="Descope Logo" />
</a><br />
<div>Descope</div>
<sub>💵</sub>
</td>
</tr>
<tr>
<td align="center" valign="top">
<a href="https://badass.dev" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/136839242?v=4" alt="Badass Courses Logo" />
<img height="96" src="https://avatars.githubusercontent.com/u/136839242?v=4" alt="Badass Courses Logo" />
</a><br />
<div>Badass Courses</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://github.com/encoredev/encore" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/50438175?v=4" alt="Encore Logo" />
<img height="96" src="https://avatars.githubusercontent.com/u/50438175?v=4" alt="Encore Logo" />
</a><br />
<div>Encore</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://checklyhq.com" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/25982255?s=200&v=4" alt="Checkly Logo" />
<img height="96" src="https://avatars.githubusercontent.com/u/25982255?s=200&v=4" alt="Checkly Logo" />
</a><br />
<div>Checkly</div>
<sub>☁️</sub>
</td>
<td align="center" valign="top">
<a href="https://superblog.ai/" target="_blank">
<img width="108" src="https://d33wubrfki0l68.cloudfront.net/cdc4a3833bd878933fcc131655878dbf226ac1c5/10cd6/images/logo_bolt_small.png" alt="superblog Logo" />
<img height="96" src="https://d33wubrfki0l68.cloudfront.net/cdc4a3833bd878933fcc131655878dbf226ac1c5/10cd6/images/logo_bolt_small.png" alt="superblog Logo" />
</a><br />
<div>superblog</div>
<sub>☁️</sub>
</td>
<td align="center" valign="top">
<a href="https://www.netlight.com/" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/1672348?s=200&v=4" alt="Netlight logo" />
<img height="96" src="https://avatars.githubusercontent.com/u/1672348?s=200&v=4" alt="Netlight logo" />
</a><br />
<div>Netlight</div>
<sub>☁️</sub>
</td>
<td align="center" valign="top">
<a href="https://vercel.com" target="_blank">
<img height="96" src="https://avatars.githubusercontent.com/u/14985020?s=200&v=4" alt="Vercel Logo" />
</a><br />
<div>Vercel</div>
<sub>☁️</sub>
</td>
</tr>
</tbody>
</table>
Expand Down
30 changes: 12 additions & 18 deletions packages/frameworks-express/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
<p align="center">
<br/>
<a href="https://authjs.dev" target="_blank"><img width="150px" src="https://authjs.dev/img/logo-sm.png" /></a>
<h3 align="center">Express Auth</a></h3>
<h4 align="center">Authentication for Express.</h4>
<p align="center" style="align: center;">
<a href="https://npm.im/next-auth">
<img src="https://img.shields.io/badge/TypeScript-blue?style=flat-square" alt="TypeScript" />
</a>
<a href="https://npm.im/@auth/express">
<img alt="npm" src="https://img.shields.io/npm/v/@auth/express?color=green&label=@auth/express&style=flat-square">
</a>
<a href="https://www.npmtrends.com/@auth/express">
<img src="https://img.shields.io/npm/dm/@auth/express?label=%20downloads&style=flat-square" alt="Downloads" />
</a>
<a href="https://github.com/nextauthjs/next-auth/stargazers">
<img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square" alt="GitHub Stars" />
</a>
</p>
<a href="https://expressjs.com" target="_blank"><img height="96px" src="https://authjs.dev/img/etc/express.svg" /></a>
<a href="https://express.authjs.dev" target="_blank"><img height="96px" src="https://authjs.dev/img/logo-sm.png" /></a>
<h1 align="center">Express Auth</h1>
</p>
<p align="center">
Authentication for Express.
</p>
<p align="center">
<a href="https://www.npmjs.com/package/@auth/express"><img src="https://img.shields.io/npm/v/@auth/express?style=flat-square&label=latest&color=purple" alt="npm latest release" /></a>
<a href="https://www.npmtrends.com/@auth/express"><img src="https://img.shields.io/npm/dm/@auth/express?style=flat-square&color=cyan" alt="Downloads" /></a>
<a href="https://github.com/nextauthjs/next-auth/stargazers"><img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square&color=orange" alt="Github Stars" /></a>
<img src="https://shields.io/badge/TypeScript-3178C6?logo=TypeScript&logoColor=fff&style=flat-square" alt="TypeScript" />
</p>

---
Expand Down
8 changes: 4 additions & 4 deletions packages/frameworks-qwik/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<p align="center">
<a href="https://qwik.dev" target="_blank"><img height="96px" src="https://authjs.dev/img/etc/qwik.svg" /></a>
<a href="https://qwik.authjs.dev" target="_blank"><img height="96px" src="https://authjs.dev/img/logo-sm.png" /></a>
<h1 align="center">Qwik Auth.js</h1>
<h1 align="center">Qwik Auth</h1>
</p>
<p align="center">
Authentication for Qwik.
</p>
<p align="center">
<a href="https://npm.im/@auth/qwik"><img src="https://img.shields.io/badge/TypeScript-grey?style=flat-square&logo=typescript&labelColor=fff" alt="TypeScript" /></a>
<a href="https://www.npmtrends.com/@auth/qwik"><img src="https://img.shields.io/npm/dm/@auth/qwik?style=flat-square&color=cyan" alt="Downloads" /></a>
<a href="https://www.npmjs.com/package/@auth/qwik"><img src="https://img.shields.io/npm/v/@auth/qwik?style=flat-square&label=latest&color=purple" alt="npm latest release" /></a>
<a href="https://github.com/nextauthjs/cli/stargazers"><img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square&color=orange" alt="Github Stars" /></a>
<a href="https://www.npmtrends.com/@auth/qwik"><img src="https://img.shields.io/npm/dm/@auth/qwik?style=flat-square&color=cyan" alt="Downloads" /></a>
<a href="https://github.com/nextauthjs/next-auth/stargazers"><img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square&color=orange" alt="Github Stars" /></a>
<img src="https://shields.io/badge/TypeScript-3178C6?logo=TypeScript&logoColor=fff&style=flat-square" alt="TypeScript" />
</p>

---
Expand Down
98 changes: 18 additions & 80 deletions packages/frameworks-solid-start/README.MD
Original file line number Diff line number Diff line change
@@ -1,80 +1,18 @@
# Getting started

Recommended to use [create-jd-app](https://github.com/OrJDev/create-jd-app)

```bash
npm install @auth/solid-start@latest @auth/core@latest
```

## Setting It Up

[Generate auth secret](https://generate-secret.vercel.app/32), then set it as an environment variable:

```
AUTH_SECRET=your_auth_secret
```

### On Production

Don't forget to trust the host.

```
AUTH_TRUST_HOST=true
```

## Creating the api handler

in this example we are using github so make sure to set the following environment variables:

```
GITHUB_ID=your_github_oauth_id
GITHUB_SECRET=your_github_oauth_secret
```

```ts
// routes/api/auth/[...solidauth].ts
import { SolidAuth, type SolidAuthConfig } from "@auth/solid-start"
import GitHub from "@auth/core/providers/github"

export const authOpts: SolidAuthConfig = {
providers: [
GitHub({
clientId: process.env.GITHUB_ID,
clientSecret: process.env.GITHUB_SECRET,
}),
],
debug: false,
}

export const { GET, POST } = SolidAuth(authOpts)
```

## Signing in and out

```ts
import { signIn, signOut } from "@auth/solid-start/client"
const login = () => signIn("github")
const logout = () => signOut()
```

## Getting the current session

```ts
import { getSession } from "@auth/solid-start"
import { createServerData$ } from "solid-start/server"
import { authOpts } from "~/routes/api/auth/[...solidauth]"

export const useSession = () => {
return createServerData$(
async (_, { request }) => {
return await getSession(request, authOpts)
},
{ key: () => ["auth_user"] }
)
}

// useSession returns a resource:
const session = useSession()
const loading = session.loading
const user = () => session()?.user
```
<p align="center">
<a href="https://start.solidjs.com" target="_blank"><img height="96px" src="https://authjs.dev/img/etc/solidstart.svg" /></a>
<a href="https://solid-start.authjs.dev" target="_blank"><img height="96px" src="https://authjs.dev/img/logo-sm.png" /></a>
<h1 align="center">SolidStart Auth</h1>
</p>
<p align="center">
Authentication for SolidStart.
</p>
<p align="center">
<a href="https://www.npmjs.com/package/@auth/solid-start"><img src="https://img.shields.io/npm/v/@auth/solid-start?style=flat-square&label=latest&color=purple" alt="npm latest release" /></a>
<a href="https://www.npmtrends.com/@auth/solid-start"><img src="https://img.shields.io/npm/dm/@auth/solid-start?style=flat-square&color=cyan" alt="Downloads" /></a>
<a href="https://github.com/nextauthjs/next-auth/stargazers"><img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square&color=orange" alt="Github Stars" /></a>
<img src="https://shields.io/badge/TypeScript-3178C6?logo=TypeScript&logoColor=fff&style=flat-square" alt="TypeScript" />
</p>

---

Check out the documentation at [solid-start.authjs.dev](https://solid-start.authjs.dev).
30 changes: 12 additions & 18 deletions packages/frameworks-sveltekit/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
<p align="center">
<br/>
<a href="https://authjs.dev" target="_blank"><img width="150px" src="https://authjs.dev/img/logo-sm.png" /></a>
<h3 align="center">SvelteKit Auth</a></h3>
<h4 align="center">Authentication for SvelteKit.</h4>
<p align="center" style="align: center;">
<a href="https://npm.im/next-auth">
<img src="https://img.shields.io/badge/TypeScript-blue?style=flat-square" alt="TypeScript" />
</a>
<a href="https://npm.im/@auth/sveltekit">
<img alt="npm" src="https://img.shields.io/npm/v/@auth/sveltekit?color=green&label=@auth/sveltekit&style=flat-square">
</a>
<a href="https://www.npmtrends.com/@auth/sveltekit">
<img src="https://img.shields.io/npm/dm/@auth/sveltekit?label=%20downloads&style=flat-square" alt="Downloads" />
</a>
<a href="https://github.com/nextauthjs/next-auth/stargazers">
<img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square" alt="GitHub Stars" />
</a>
</p>
<a href="https://kit.svelte.dev" target="_blank"><img height="96px" src="https://authjs.dev/img/etc/sveltekit.svg" /></a>
<a href="https://sveltekit.authjs.dev" target="_blank"><img height="96px" src="https://authjs.dev/img/logo-sm.png" /></a>
<h1 align="center">SvelteKit Auth</h1>
</p>
<p align="center">
Authentication for SvelteKit.
</p>
<p align="center">
<a href="https://www.npmjs.com/package/@auth/sveltekit"><img src="https://img.shields.io/npm/v/@auth/sveltekit?style=flat-square&label=latest&color=purple" alt="npm latest release" /></a>
<a href="https://www.npmtrends.com/@auth/sveltekit"><img src="https://img.shields.io/npm/dm/@auth/sveltekit?style=flat-square&color=cyan" alt="Downloads" /></a>
<a href="https://github.com/nextauthjs/next-auth/stargazers"><img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square&color=orange" alt="Github Stars" /></a>
<img src="https://shields.io/badge/TypeScript-3178C6?logo=TypeScript&logoColor=fff&style=flat-square" alt="TypeScript" />
</p>

---
Expand Down
30 changes: 12 additions & 18 deletions packages/next-auth/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
<p align="center">
<br/>
<a href="https://authjs.dev" target="_blank"><img width="150px" src="https://authjs.dev/img/logo-sm.png" /></a>
<h3 align="center">NextAuth.js</a></h3>
<h4 align="center">Authentication for Next.js.</h4>
<p align="center" style="align: center;">
<a href="https://npm.im/next-auth">
<img src="https://img.shields.io/badge/TypeScript-blue?style=flat-square" alt="TypeScript" />
</a>
<a href="https://npm.im/next-auth">
<img alt="npm" src="https://img.shields.io/npm/v/next-auth?color=green&label=next-auth&style=flat-square">
</a>
<a href="https://www.npmtrends.com/next-auth">
<img src="https://img.shields.io/npm/dm/next-auth?label=%20downloads&style=flat-square" alt="Downloads" />
</a>
<a href="https://github.com/nextauthjs/next-auth/stargazers">
<img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square" alt="GitHub Stars" />
</a>
</p>
<a href="https://nextjs.org" target="_blank"><img height="96px" src="https://authjs.dev/img/etc/nextjs.svg" /></a>
<a href="https://nextjs.authjs.dev" target="_blank"><img height="96px" src="https://authjs.dev/img/logo-sm.png" /></a>
<h1 align="center">NextAuth.js</h1>
</p>
<p align="center">
Authentication for Next.js.
</p>
<p align="center">
<a href="https://www.npmjs.com/package/next-auth"><img src="https://img.shields.io/npm/v/next-auth/beta?style=flat-square&label=latest&color=purple" alt="npm beta release" /></a>
<a href="https://www.npmtrends.com/next-auth"><img src="https://img.shields.io/npm/dm/next-auth?style=flat-square&color=cyan" alt="Downloads" /></a>
<a href="https://github.com/nextauthjs/next-auth/stargazers"><img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square&color=orange" alt="Github Stars" /></a>
<img src="https://shields.io/badge/TypeScript-3178C6?logo=TypeScript&logoColor=fff&style=flat-square" alt="TypeScript" />
</p>

---
Expand Down

0 comments on commit a6b3364

Please sign in to comment.