Better Auth with Capacitor

Hi everyone, I’ve set up a backend using Hono and BetterAuth. My frontend is a ReactJS project with Capacitor. I’ve also installed BetterAuth on my frontend to use client functions for logging in and other things. Everything works fine when I use a regular browser, but when I build the app natively with Capacitor, the token isn’t stored. Do you have any tips or can you provide an example somewhere?
1 Reply
daveycodez
daveycodez3d ago
You need to add the capacitor URL to trustedOrigins in your auth.tsx

Did you find this page helpful?