diff --git a/.github/assets/account-settings.png b/.github/assets/account-settings.png new file mode 100644 index 000000000..f0e1d9b15 Binary files /dev/null and b/.github/assets/account-settings.png differ diff --git a/assets/components.png b/.github/assets/components.png similarity index 100% rename from assets/components.png rename to .github/assets/components.png diff --git a/.github/assets/connected-accounts.png b/.github/assets/connected-accounts.png new file mode 100644 index 000000000..b955e527e Binary files /dev/null and b/.github/assets/connected-accounts.png differ diff --git a/.github/assets/create-project.gif b/.github/assets/create-project.gif new file mode 100644 index 000000000..246bed917 Binary files /dev/null and b/.github/assets/create-project.gif differ diff --git a/.github/assets/dark-light-mode.png b/.github/assets/dark-light-mode.png new file mode 100644 index 000000000..750f484ae Binary files /dev/null and b/.github/assets/dark-light-mode.png differ diff --git a/assets/dashboard.png b/.github/assets/dashboard.png similarity index 100% rename from assets/dashboard.png rename to .github/assets/dashboard.png diff --git a/.github/assets/email-editor.png b/.github/assets/email-editor.png new file mode 100644 index 000000000..e57be162d Binary files /dev/null and b/.github/assets/email-editor.png differ diff --git a/.github/assets/impersonate.png b/.github/assets/impersonate.png new file mode 100644 index 000000000..1f2338b8e Binary files /dev/null and b/.github/assets/impersonate.png differ diff --git a/assets/logo.png b/.github/assets/logo.png similarity index 100% rename from assets/logo.png rename to .github/assets/logo.png diff --git a/.github/assets/m2m-auth.png b/.github/assets/m2m-auth.png new file mode 100644 index 000000000..01f0dba5a Binary files /dev/null and b/.github/assets/m2m-auth.png differ diff --git a/.github/assets/oauth-refresh.png b/.github/assets/oauth-refresh.png new file mode 100644 index 000000000..c679e69ed Binary files /dev/null and b/.github/assets/oauth-refresh.png differ diff --git a/.github/assets/permissions.png b/.github/assets/permissions.png new file mode 100644 index 000000000..8662c77a1 Binary files /dev/null and b/.github/assets/permissions.png differ diff --git a/.github/assets/sign-in.png b/.github/assets/sign-in.png new file mode 100644 index 000000000..bdb3bdbb5 Binary files /dev/null and b/.github/assets/sign-in.png differ diff --git a/.github/assets/stack-webhooks.png b/.github/assets/stack-webhooks.png new file mode 100644 index 000000000..7a4a54cf9 Binary files /dev/null and b/.github/assets/stack-webhooks.png differ diff --git a/.github/assets/team-switcher.png b/.github/assets/team-switcher.png new file mode 100644 index 000000000..f4e0a6c2a Binary files /dev/null and b/.github/assets/team-switcher.png differ diff --git a/.github/assets/user-button.png b/.github/assets/user-button.png new file mode 100644 index 000000000..e3456677a Binary files /dev/null and b/.github/assets/user-button.png differ diff --git a/.vscode/settings.json b/.vscode/settings.json index fca0fdf7a..9bb0968bb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -30,6 +30,7 @@ "Proxied", "reqs", "stackframe", + "Svix", "typecheck", "typehack", "Uncapitalize", diff --git a/README.md b/README.md index 82b466ccf..47246e48d 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,45 @@ -![Stack Logo](/assets/logo.png) +![Stack Logo](/.github/assets/logo.png)

- 📘 Documentation + 📘 Docs | ☁️ Hosted Version | ✨ Demo | 🎮 Discord

-## 💬 What is Stack Auth? +# Stack Auth: Open-source Clerk/Auth0 alternative -Stack Auth is the open-source, self-hostable alternative to Auth0/Clerk. +Stack Auth is a managed user authentication solution. It is developer-friendly and fully open-source (licensed under MIT and AGPL). -We are a fully managed solution; we provide frontend and backend libraries for Next.js, React, and JavaScript. Our setup is just five minutes, and you will instantly get to use features that you would otherwise need to implement yourself as you grow your project, such as password reset, organizations/teams, impersonation, RBAC, and user metadata. +Stack gets you started in just five minutes, after which you'll be ready to use all of its features as you grow your project. Our managed service is completely optional and you can export your user data and self-host, for free, at any time. -Here are some of the components you get out-of-the-box: +We support Next.js frontends, along with any backend that can use our [REST API](https://docs.stack-auth.com/rest-api/auth). Check out our [setup guide](https://docs.stack-auth.com/getting-started/setup) to get started. -![Stack Sign Up Page](/assets/components.png) - -Here is the user/project management dashboard: - -![Stack Dashboard](/assets/dashboard.png) +
+Stack Setup +
## ✨ Features -- Composable React components & hooks -- OAuth (Google, Facebook, GitHub, etc.) -- Magic link and email password authentication (with email verification and password reset) -- Easy to set up with proxied providers (no need to sign up and create OAuth endpoints yourself on all the providers) -- User management & analytics -- Teams & permissions -- User-associated metadata with client-/server-specific permissions -- Out-of-the-box dark/light mode support -- Fully customizable UI, or build your own UI with our functions like `signInWithOAuth` -- **100% open-source!** +| | | +|-|:-:| +|

`` and ``

Authentication components that support OAuth, password credentials, and magic links, with shared development keys to make setup faster. All components support dark/light modes. | Sign-in component | +|

Idiomatic Next.js APIs

We build on server components, React hooks, and route handlers. | ![Dark/light mode](.github/assets/components.png) | +|

User dashboard

Dashboard to filter, analyze, and edit users. Replaces the first internal tool you would have to build. | ![User dashboard](.github/assets/dashboard.png) | +|

Account settings

Lets users update their profile, verify their e-mail, or change their password. No setup required. | Account settings component | +|

Multi-tenancy & teams

Manage B2B customers with an organization structure that makes sense and scales to millions. | Selected team switcher component | +|

Role-based access control

Define an arbitrary permission graph and assign it to users. Organizations can create org-specific roles. | RBAC | +|

OAuth Connections

Beyond login, Stack can also manage access tokens for third-party APIs, such as Outlook and Google Calendar. It handles refreshing tokens and controlling scope, making access tokens accessible via a single function call. | OAuth tokens | +|

Impersonation

Impersonate users for debugging and support, logging into their account as if you were them. | Webhooks | +|

Webhooks

Get notified when users use your product, built on Svix. | Webhooks | +|

Automatic emails

Send customizable emails on triggers such as sign-up, password reset, and email verification, editable with a WYSIWYG editor. | Email templates | +|

User session & JWT handling

Stack manages refresh and access tokens, JWTs, and cookies, resulting in the best performance at no implementation cost. | User button | +|

M2M authentication

Use short-lived access tokens to authenticate your machines to other machines. | M2M authentication | -## 🔭 Vision - -We all know how much overhead there is when starting a new project. Developers need to handle so many things that aren't even part of their core business, like user authentication, user profiles, payments, dashboards, hosting, and more. Our vision is to build a full-stack framework that handles all of this out-of-the-box with less than 10 minutes of setup, so developers can focus on what they really want to build. Authentication is the first step towards this vision. ## 📦 Installation & Setup -To get started with Stack, you need to [create a Next.js project](https://nextjs.org/docs/getting-started/installation) using the App router. Then, you can install Stack by running the following command: - -```bash -npx @stackframe/init-stack@latest -``` - -You will then be guided through the installation process. - -For further configuration and usage, refer to [our documentation](https://docs.stack-auth.com). +Refer to [our documentation](https://docs.stack-auth.com/getting-started/setup) on how to set up Stack Auth in your Next.js project. ## 🌱 Some community projects built with Stack @@ -59,7 +50,11 @@ For further configuration and usage, refer to [our documentation](https://docs.s This is for you if you want to contribute to the Stack project or run the Stack dashboard locally. -Please read the [contribution guidelines](CONTRIBUTING.md) before contributing. +**Important**: Please read the [contribution guidelines](CONTRIBUTING.md) carefully and join [our Discord](https://discord.stack-auth.com) if you'd like to help. + + +
+ Local setup ### Requirements @@ -116,12 +111,11 @@ If you make changes to the Prisma schema, you need to run the following command ```sh pnpm run prisma migrate dev ``` +
## Contributors -**Important**: Please read the [contribution guidelines](CONTRIBUTING.md) carefully and join [our Discord](https://discord.stack-auth.com) if you'd also like to help. - -Thanks to our amazing community who have helped us build Stack: +Thanks to the amazing community who built Stack: diff --git a/packages/stack/src/lib/stack-app.ts b/packages/stack/src/lib/stack-app.ts index e279044c0..50c8282cc 100644 --- a/packages/stack/src/lib/stack-app.ts +++ b/packages/stack/src/lib/stack-app.ts @@ -1820,7 +1820,7 @@ class _StackAdminAppImpl