Integrating with Stytch
Stytch is architected to be embedded directly into your application, offering you flexibility and control over your integration and creating a seamless and native experience for users.
There are three different high level approaches to integrating Stytch directly into your application:
- Backend Integration: entirely server-side integration, where your backend calls Stytch's API through our backend SDK
- Headless Frontend Integration: your client invokes Stytch's headless frontend SDKs, which handles things like client-side session management out of the box, while providing flexibility in UX and UI
- Pre-built UI Frontend Integration: your client mounts the Stytch UI component on relevant routes, and the Stytch SDK handles the full login flow automatically
While we describe these as distinct integration options, most customers mix-and-match approaches to fit their needs. If you are using our pre-built UI for login, you might still leverage the headless methods for post-login changes (e.g. updating profile information) and if you are using our frontend SDKs, it is important to still do server-side session authentication checks with our backend SDKs for security reasons.
Choosing an integration approach
Stytch's frontend SDKs are built on top of our backend SDKs, and you can always change integration approaches in the future without any disruption to your application. Picking which approach to use to start largely comes down to how much you want to offload to Stytch vs how much flexibility and control you want.
The below are key differences to consider when deciding which approach is right for your use case and needs:
Relevant Resources
Frontend (headless and pre-built UI)
- Frontend JS SDKs
- Mobile SDKs (headless)
- iOS SDK
- Android SDK
- React Native SDK (pre-built UI coming soon)
Check out the SDKs reference for full documentation.
Read the guide for implementing pre-built UI components and for using our frontend SDK headlessly for more in-depth implementation details and considerations.
Backend
Read the backend implementation guide for more in-depth implementation details and considerations.
Still unsure what to choose?
If you have additional questions about our different integration options, please feel free to reach out to us in our community Slack, our developer forum, or at support@stytch.com for further guidance.