Quickstart
React
Integrate CakeAuth into your React app in just a few steps!
Before continuing
Make sure you have:
- Setup your account
- React app with Vite configured
Setup environment variables
In your .env
file (create one if it doesn't exist), add the following:
VITE_CAKEAUTH_PUBLIC_KEY
: your public key
Don't know where to get those? Check out this quick cheat sheet.
Add ready-to-use components
Add CakeAuth middleware to your Next.js app:
- Add
CakeAuthProvider
to your main file
- Add authentication components to your app
What's next?
TODO:
- Adding more auth options
- protect pages/components
- protect API routes
- session management
- more on sdk reference
Last updated on