Vanilla JavaScript Client
Vanilla JavaScript client library
Stack Auth provides a vanilla JavaScript/TypeScript client library that works with any JavaScript framework in both frontend and backend environments.
Key differences between the JavaScript and Next.js client libraries:
- No built-in UI components or default pages - you’ll need to implement your own UI and callback handlers
- No React hooks functionality (useUser(), useStackApp(), etc.)
Installation
Backend
Initialization
Example usage
Check out the SDK reference for more details and examples.
Frontend
Initialization
Example usage
Check out the SDK reference for more details and examples.
HTML + JS + Vite Example
Here is how to use Stack Auth with Vite, other frameworks work with the same principle. The full example code is available here.
Initialize the app
stack.ts