Configure your Project in the Stytch Dashboard
- Navigate to Frontend SDK and click Enable SDK.
- In Project ID & API keys, copy your
public_token.
Add Stytch to your project
Install @stytch/nextjs:Or with Yarn:Initialize the Stytch client with your
public_token:layout.tsx
Configure OTP for signup and login
Create a component for your signup/login page and pass the OTP config. The Stytch UI accepts a config object; learn more here.
Tie it all together
You now have an OTP signup and login flow with the pre-built UI config. The SDK handles the code authentication and manages the session automatically. Learn more about sessions here.Have feedback after integrating? Reach out in our forum, via support@stytch.com, or in our Slack community.