stack/packages/template
CactusBlue 240f866900
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
Docker Emulator Test / docker (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Test / docker (push) Has been cancelled
Runs E2E API Tests / build (22.x) (push) Has been cancelled
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (push) Has been cancelled
Dev Environment Test / restart-dev-and-test (push) Has been cancelled
Run setup tests / setup-tests (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
CLI Login for NodeJS (#602)
<!-- ELLIPSIS_HIDDEN -->


> [!IMPORTANT]
> Adds CLI authentication for NodeJS with new error handling and updates
dependencies.
> 
>   - **CLI Authentication**:
> - Adds `promptCliLogin()` method in `_StackClientAppImplIncomplete` to
handle CLI authentication, returning a refresh token or error.
> - Handles errors `CliAuthError`, `CliAuthExpiredError`, and
`CliAuthUsedError`.
>   - **Error Handling**:
> - Adds `CliAuthError`, `CliAuthExpiredError`, and `CliAuthUsedError`
to `known-errors.tsx`.
>   - **Dependencies**:
>     - Adds `open` to `dependencies` in `package.json`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 98b0ccd0d2. It will automatically
update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
2025-04-12 16:09:51 -07:00
..
scripts added writeFileSyncIfChanged to all the codegen 2025-02-19 12:11:17 -08:00
src CLI Login for NodeJS (#602) 2025-04-12 16:09:51 -07:00
.env Vanilla JS client library (#408) 2025-02-08 02:31:03 +01:00
.eslintrc.cjs JS lib docs (#444) 2025-02-20 00:48:05 +01:00
.gitignore Vanilla JS client library (#408) 2025-02-08 02:31:03 +01:00
CHANGELOG.md chore: update package versions 2025-04-09 17:15:42 -07:00
components.json Vanilla JS client library (#408) 2025-02-08 02:31:03 +01:00
LICENSE Vanilla JS client library (#408) 2025-02-08 02:31:03 +01:00
next-env.d.ts Vanilla JS client library (#408) 2025-02-08 02:31:03 +01:00
package-template.json chore: update package versions 2025-04-09 17:15:42 -07:00
package.json chore: update package versions 2025-04-09 17:15:42 -07:00
postcss.config.js Vanilla JS client library (#408) 2025-02-08 02:31:03 +01:00
quetzal.config.json Vanilla JS client library (#408) 2025-02-08 02:31:03 +01:00
README.md Update branding from Stack to Stack Auth in documentation (#504) 2025-03-04 04:07:54 +01:00
tailwind.config.js Vanilla JS client library (#408) 2025-02-08 02:31:03 +01:00
tsconfig.json In-source unit tests (#429) 2025-02-14 11:47:52 -08:00
tsup.config.ts Reduce test flakeyness (#517) 2025-03-07 13:34:50 -08:00
vitest.config.ts In-source unit tests (#429) 2025-02-14 11:47:52 -08:00

Stack Auth: Open-source Clerk/Auth0 alternative

📘 Docs | ☁️ Hosted Version | Demo | 🎮 Discord | GitHub

Stack Auth is a managed user authentication solution. It is developer-friendly and fully open-source (licensed under MIT and AGPL).

Stack 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.

We support Next.js frontends, along with any backend that can use our REST API. Check out our setup guide to get started.

📦 Installation & Setup

  1. Run Stack Auth's installation wizard with the following command:
    npx @stackframe/init-stack@latest
    
  2. Then, create an account on the Stack Auth dashboard, create a new project with an API key, and copy its environment variables into the .env.local file of your Next.js project:
    NEXT_PUBLIC_STACK_PROJECT_ID=<your-project-id>
    NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=<your-publishable-client-key>
    STACK_SECRET_SERVER_KEY=<your-secret-server-key>
    
  3. That's it! You can run your app with npm run dev and go to 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.

Check out the documentation for a more detailed guide.