{"id":25599264,"url":"https://github.com/stack-auth/stack-auth","last_synced_at":"2026-04-17T22:01:46.482Z","repository":{"id":224943337,"uuid":"764642350","full_name":"stack-auth/stack-auth","owner":"stack-auth","description":"Open-source Auth0/Clerk alternative","archived":false,"fork":false,"pushed_at":"2026-04-14T04:52:46.000Z","size":54612,"stargazers_count":6765,"open_issues_count":38,"forks_count":513,"subscribers_count":16,"default_branch":"dev","last_synced_at":"2026-04-14T06:33:24.830Z","etag":null,"topics":["auth","auth0","authentication","clerk","cognito","email-password","firebase-auth","keycloak","login","magic-link","nextjs","oauth","password","react","session-management","shadcn","signin","social-login","supabase-auth","typescript"],"latest_commit_sha":null,"homepage":"https://stack-auth.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stack-auth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2024-02-28T13:01:24.000Z","updated_at":"2026-04-14T03:49:05.000Z","dependencies_parsed_at":"2024-02-28T18:49:20.710Z","dependency_job_id":"7ddf3577-7060-40e7-89bf-84089ffcac8a","html_url":"https://github.com/stack-auth/stack-auth","commit_stats":{"total_commits":1055,"total_committers":26,"mean_commits":40.57692307692308,"dds":0.4729857819905213,"last_synced_commit":"e6b898126e34707f589ae475a1a8872488cd6b5f"},"previous_names":["stackframe-inc/stack","stackframe-projects/stack","stack-auth/stack","stack-auth/stack-auth"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/stack-auth/stack-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stack-auth%2Fstack-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stack-auth%2Fstack-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stack-auth%2Fstack-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stack-auth%2Fstack-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stack-auth","download_url":"https://codeload.github.com/stack-auth/stack-auth/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stack-auth%2Fstack-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31947760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth","auth0","authentication","clerk","cognito","email-password","firebase-auth","keycloak","login","magic-link","nextjs","oauth","password","react","session-management","shadcn","signin","social-login","supabase-auth","typescript"],"created_at":"2025-02-21T14:21:33.123Z","updated_at":"2026-04-17T22:01:46.413Z","avatar_url":"https://github.com/stack-auth.png","language":"TypeScript","readme":"[![Stack Logo](/.github/assets/logo.png)](https://stack-auth.com)\n\n\u003ch3 align=\"center\"\u003e\n  \u003ca href=\"https://docs.stack-auth.com\"\u003e📘 Docs\u003c/a\u003e\n  | \u003ca href=\"https://stack-auth.com/\"\u003e☁️ Hosted Version\u003c/a\u003e\n  | \u003ca href=\"https://demo.stack-auth.com/\"\u003e✨ Demo\u003c/a\u003e\n  | \u003ca href=\"https://discord.stack-auth.com\"\u003e🎮 Discord\u003c/a\u003e\n\u003c/h4\u003e\n\n# Stack Auth: The open-source auth platform\n\nStack Auth is a managed user authentication solution. It is developer-friendly and fully open-source (licensed under MIT and AGPL).\n\nStack Auth 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.\n\nWe support Next.js, React, and JavaScript frontends, along with any backend that can use our [REST API](https://docs.stack-auth.com/api/overview). Check out our [setup guide](https://docs.stack-auth.com/docs/next/getting-started/setup) to get started.\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg alt=\"Stack Auth Setup\" src=\".github/assets/create-project.gif\" width=\"400\" /\u003e\n\u003c/div\u003e\n\n## Table of contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [How is this different from X?](#how-is-this-different-from-x)\n- [✨ Features](#-features)\n- [📦 Installation \u0026 Setup](#-installation--setup)\n- [🌱 Some community projects built with Stack Auth](#-some-community-projects-built-with-stack-auth)\n  - [Templates](#templates)\n  - [Examples](#examples)\n- [🏗 Development \u0026 Contribution](#-development--contribution)\n  - [Requirements](#requirements)\n  - [Setup](#setup)\n  - [Useful commands](#useful-commands)\n- [❤ Contributors](#-contributors)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## How is this different from X?\n\nAsk yourself about `X`:\n\n- Is `X` open-source?\n- Is `X` developer-friendly, well-documented, and lets you get started in minutes?\n- Besides authentication, does `X` also do authorization and user management (see feature list below)?\n\nIf you answered \"no\" to any of these questions, then that's how Stack Auth is different from `X`.\n\n## ✨ Features\n\nTo get notified first when we add new features, please subscribe to [our newsletter](https://stack-auth.beehiiv.com/subscribe).\n\n| | |\n|-|:-:|\n| \u003ch3\u003e`\u003cSignIn/\u003e` and `\u003cSignUp/\u003e`\u003c/h3\u003e Authentication components that support OAuth, password credentials, and magic links, with shared development keys to make setup faster. All components support dark/light modes. | \u003cimg alt=\"Sign-in component\" src=\".github/assets/dark-light-mode.png\" width=\"250px\"\u003e |\n| \u003ch3\u003eIdiomatic Next.js APIs\u003c/h3\u003e We build on server components, React hooks, and route handlers. | ![Dark/light mode](.github/assets/components.png) |\n| \u003ch3\u003eUser dashboard\u003c/h3\u003e Dashboard to filter, analyze, and edit users. Replaces the first internal tool you would have to build. | ![User dashboard](.github/assets/dashboard.png) |\n| \u003ch3\u003eAccount settings\u003c/h3\u003e Lets users update their profile, verify their e-mail, or change their password. No setup required. | \u003cimg alt=\"Account settings component\" src=\".github/assets/account-settings.png\" width=\"300px\"\u003e |\n| \u003ch3\u003eMulti-tenancy \u0026 teams\u003c/h3\u003e Manage B2B customers with an organization structure that makes sense and scales to millions. | \u003cimg alt=\"Selected team switcher component\" src=\".github/assets/team-switcher.png\" width=\"400px\"\u003e |\n| \u003ch3\u003eRole-based access control\u003c/h3\u003e Define an arbitrary permission graph and assign it to users. Organizations can create org-specific roles. | \u003cimg alt=\"RBAC\" src=\".github/assets/permissions.png\"  width=\"400px\"\u003e |\n| \u003ch3\u003eOAuth Connections\u003c/h3\u003eBeyond login, Stack Auth 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. | \u003cimg alt=\"OAuth tokens\" src=\".github/assets/connected-accounts.png\"  width=\"250px\"\u003e |\n| \u003ch3\u003ePasskeys\u003c/h3\u003e Support for passwordless authentication using passkeys, allowing users to sign in securely with biometrics or security keys across all their devices. | \u003cimg alt=\"OAuth tokens\" src=\".github/assets/passkeys.png\"  width=\"400px\"\u003e |\n| \u003ch3\u003eImpersonation\u003c/h3\u003e Impersonate users for debugging and support, logging into their account as if you were them. | \u003cimg alt=\"Webhooks\" src=\".github/assets/impersonate.png\"  width=\"350px\"\u003e |\n| \u003ch3\u003eWebhooks\u003c/h3\u003e Get notified when users use your product, built on Svix. | \u003cimg alt=\"Webhooks\" src=\".github/assets/stack-webhooks.png\"  width=\"300px\"\u003e |\n| \u003ch3\u003eAutomatic emails\u003c/h3\u003e Send customizable emails on triggers such as sign-up, password reset, and email verification, editable with a WYSIWYG editor. | \u003cimg alt=\"Email templates\" src=\".github/assets/email-editor.png\"  width=\"400px\"\u003e |\n| \u003ch3\u003eUser session \u0026 JWT handling\u003c/h3\u003e Stack Auth manages refresh and access tokens, JWTs, and cookies, resulting in the best performance at no implementation cost. | \u003cimg alt=\"User button\" src=\".github/assets/user-button.png\"  width=\"400px\"\u003e |\n| \u003ch3\u003eM2M authentication\u003c/h3\u003e Use short-lived access tokens to authenticate your machines to other machines. | \u003cimg src=\".github/assets/m2m-auth.png\" alt=\"M2M authentication\"  width=\"400px\"\u003e |\n\n\n## 📦 Installation \u0026 Setup\n\nTo install Stack Auth in your Next.js project (for React, JavaScript, or other frameworks, see our [complete documentation](https://docs.stack-auth.com)):\n\n1. Run Stack Auth's installation wizard with the following command:\n    ```bash\n    npx @stackframe/stack-cli@latest init\n    ```\n\n2. Then, create an account on the [Stack Auth dashboard](https://app.stack-auth.com/projects), create a new project with an API key, and copy its environment variables into the .env.local file of your Next.js project:\n    ```\n    NEXT_PUBLIC_STACK_PROJECT_ID=\u003cyour-project-id\u003e\n    NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=\u003cyour-publishable-client-key\u003e\n    STACK_SECRET_SERVER_KEY=\u003cyour-secret-server-key\u003e\n    ```\n3. That's it! You can run your app with `npm run dev` and go to [http://localhost:3000/handler/signup](http://localhost:3000/handler/signup) to see the sign-up page. You can also check out the account settings page at [http://localhost:3000/handler/account-settings](http://localhost:3000/handler/account-settings).\n\nCheck out the [documentation](https://docs.stack-auth.com/getting-started/setup) for a more detailed guide.\n\n## 🌱 Some community projects built with Stack Auth\n\nHave your own? Happy to feature it if you create a PR or message us on [Discord](https://discord.stack-auth.com).\n\n### Templates\n- [Stack Auth Template by Stack Auth Team](https://github.com/stack-auth/stack-auth-template)\n- [Next SaaSkit by wolfgunblood](https://github.com/wolfgunblood/nextjs-saaskit)\n- [SaaS Boilerplate by Robin Faraj](https://github.com/robinfaraj/saas-boilerplate)\n\n### Examples\n- [Stack Auth Example by career-tokens](https://github.com/career-tokens/StackYCAuth)\n- [Stack Auth Demo by the Stack Auth team](https://github.com/stack-auth/stack-auth/tree/dev/examples/demo)\n- [Stack Auth E-Commerce Example by the Stack Auth team](https://github.com/stack-auth/stack-auth/tree/dev/examples/e-commerce)\n\n## 🏗 Development \u0026 Contribution\n\nThis is for you if you want to contribute to the Stack Auth project or run the Stack Auth dashboard locally.\n\n**Important**: Please read the [contribution guidelines](CONTRIBUTING.md) carefully and join [our Discord](https://discord.stack-auth.com) if you'd like to help.\n\n### Requirements\n\n- Node v20\n- pnpm v9\n- Docker\n\n### Setup\n\nNote: 24GB+ of RAM is recommended for a smooth development experience.\n\nIn a new terminal:\n\n```sh\npnpm install\n\n# Build the packages and generate code. We only need to do this once, as `pnpm dev` will do this from now on\npnpm build:packages\npnpm codegen\n\n# Start the dependencies (DB, Inbucket, etc.) as Docker containers, seeding the DB with the Prisma schema\n# Make sure you have Docker (or OrbStack) installed and running\npnpm restart-deps\n\n# Start the dev server\npnpm dev\n\n# In a different terminal, run tests in watch mode\npnpm test # useful: --no-watch (disables watch mode) and --bail 1 (stops after the first failure) \n```\n\nYou can now open the dev launchpad at [http://localhost:8100](http://localhost:8100). From there, you can navigate to the dashboard at [http://localhost:8101](http://localhost:8101), API on port 8102, demo on port 8103, docs on port 8104, Inbucket (e-mails) on port 8105, and Prisma Studio on port 8106. See the dev launchpad for a list of all running services.\n\nYour IDE may show an error on all `@stackframe/XYZ` imports. To fix this, simply restart the TypeScript language server; for example, in VSCode you can open the command palette (Ctrl+Shift+P) and run `Developer: Reload Window` or `TypeScript: Restart TS server`.\n\nPre-populated .env files for the setup below are available and used by default in `.env.development` in each of the packages. However, if you're creating a production build (eg. with `pnpm run build`), you must supply the environment variables manually (see below).\n\n### Useful commands\n\n```sh\n# NOTE:\n# Please see the dev launchpad (default: http://localhost:8100) for a list of all running services.\n\n# Installation commands\npnpm install: Installs dependencies\n\n# Types \u0026 linting commands\npnpm typecheck: Runs the TypeScript type checker. May require a build or dev server to run first.\npnpm lint: Runs the ESLint linter. Optionally, pass `--fix` to fix some of the linting errors. May require a build or dev server to run first.\n\n# Build commands\npnpm build: Builds all projects, including apps, packages, examples, and docs. Also runs code-generation tasks. Before you can run this, you will have to copy all `.env.development` files in the folders to `.env.production.local` or set the environment variables manually.\npnpm build:packages: Builds all the npm packages.\npnpm codegen: Runs all the code-generation tasks, eg. Prisma client and OpenAPI docs generation.\n\n# Development commands\npnpm dev: Runs the development servers of the main projects, excluding most examples. On the first run, requires the packages to be built and codegen to be run. After that, it will watch for file changes (including those in code-generation files). If you have to restart the development server for anything, that is a bug that you can report.\npnpm dev:full: Runs the development servers for all projects, including examples.\npnpm dev:basic: Runs the development servers only for the necessary services (backend and dashboard). Not recommended for most users, upgrade your machine instead.\n\n# Environment commands\npnpm start-deps: Starts the Docker dependencies (DB, Inbucket, etc.) as Docker containers, and initializes them with the seed script \u0026 migrations. Note: The started dependencies will be visible on the dev launchpad (port 8100 by default).\npnpm stop-deps: Stops the Docker dependencies (DB, Inbucket, etc.) and deletes the data on them.\npnpm restart-deps: Stops and starts the dependencies.\n\n# Database commands\npnpm db:migration-gen: Currently not used. Please generate Prisma migrations manually (or with AI).\npnpm db:reset: Resets the database to the initial state. Run automatically by `pnpm start-deps`.\npnpm db:init: Initializes the database with the seed script \u0026 migrations. Run automatically by `pnpm db:reset`.\npnpm db:seed: Re-seeds the database with the seed script. Run automatically by `pnpm db:init`.\npnpm db:migrate: Runs the migrations. Run automatically by `pnpm db:init`.\n\n# Testing commands\npnpm test \u003cfile-filters\u003e: Runs the tests. Pass `--bail 1` to make the test only run until the first failure. Pass `--no-watch` to run the tests once instead of in watch mode.\n\n# Various commands\npnpm explain-query: Paste a SQL query to get an explanation of the query plan, helping you debug performance issues.\npnpm verify-data-integrity: Verify the integrity of the data in the database by running a bunch of integrity checks. This should never fail at any point in time (unless you messed with the DB manually).\n```\n\nNote: When working with AI, you should keep a terminal tab with the dev server open so the AI can run queries against it.\n\n## ❤ Contributors\n\n\u003ca href=\"https://github.com/stack-auth/stack-auth/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=stack-auth/stack\u0026columns=9\" width=\"100%\" /\u003e\n\u003c/a\u003e\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstack-auth%2Fstack-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstack-auth%2Fstack-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstack-auth%2Fstack-auth/lists"}