This repo contains Stytch frontend JavaScript SDKs. For Node.js SDK, see stytch-node.
We welcome contributions from the community!
This monorepo contains the following published npm packages:
- @stytch/vanilla-js - Core JavaScript SDK for frontend projects
- @stytch/react - React-specific bindings for the JavaScript SDK
- @stytch/nextjs - Next.js specific bindings with SSR support
- @stytch/react-native - React Native SDK
See our JS SDK Documentation for complete instructions.
See example requests and responses for all the endpoints in the Stytch JS SDK Reference.
Our JS SDK also exposes in-line documentation in your IDE, just hover over a method to see it.
If you have questions, found a bug or want help troubleshooting, join us in Slack or email support@stytch.com.
If you've found a security vulnerability, please follow our responsible disclosure instructions.
You can find example apps that use our JS SDK here:
We also offer several "workbench" apps, apps that let you explore all the available methods in the SDK without simulating a real login experience.
These are great for trying things out or quickly making example calls to see the response or testing changes to the code locally.
The following workbench apps are also available in Vercel:
- React Consumer Demo App - https://stytch-browser-react-demo.vercel.app/configure
- React B2B Demo App - https://stytch-browser-react-b2b-demo.vercel.app/configure
After building dependencies, you can also run demo apps from /apps.
There are a few ways to run a demo app:
-
Build all dependencies
yarn build cd apps/react-demo -
If this is the first time, set up configurations
# You need a public token from your Stytch dashboard # For local development, you can test against the production backend # If you are a Stytch developer, you can also test against staging or your remote dev if you're testing backend changes cp .env.prod .env.local vi .env.local
-
Start the demo app and use Turborepo Pipelines to watch and recompile all dependencies together:
yarn start # for react-demo yarn dev:react # for react-b2b-demo yarn dev:b2b:react # for next-demo yarn dev:next
We welcome contributions! Please see our Contributing Guide for details on how to submit issues, pull requests, and contribute to the project.
See DEVELOPMENT.md
If you discover a security vulnerability, please report it to us at security@stytch.com. See our Security Policy for more details.
Everyone interacting in Stytch codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.