Skip to main content
Mocha includes a built‑in authentication module. Today it supports Google sign‑in via our Mocha provider. You can enable auth simply by asking the AI to add it.
Ask: “Add authentication and a sign‑in button.” The AI will set up sign‑in/out flows and guard protected pages and actions.
No. Mocha’s provider handles the Google OAuth flow. Just ask the AI to enable authentication.
Not yet. Multiple providers and scopes are on our roadmap. For now, Google is supported out of the box.
Email/password and username/password authentication are not directly supported yet. While Mocha can sometimes build custom auth flows, it often makes mistakes with security-critical code. We strongly recommend sticking with Google authentication—it’s a solid, secure mechanism that works reliably. We plan to add native email/password support soon.
Yes, if you’re on a Silver or Gold plan. By default, users see “Mocha” in the Google sign-in screen. With your own credentials, they’ll see your app’s name and logo instead. Learn more in Customize Google Sign In.

More Authentication Questions

Google authentication is currently the only officially supported option because:
  • It’s secure - Google handles the security-critical parts like password storage and two-factor auth
  • It’s reliable - Fewer things can go wrong compared to custom auth systems
  • It’s familiar - Most users already have a Google account
We’re working on adding more authentication options, including email/password, in the future.
Phone number authentication isn’t currently supported as a built-in feature. While you could potentially ask the AI to build something custom using a service like Twilio, we don’t officially support this and can’t guarantee it will work correctly.For now, we recommend using Google authentication for the most reliable experience.
Currently, Google is the supported authentication method. Users need a Google account to log in to apps that use Mocha’s built-in auth.We’re planning to add email/password authentication as an option in the future, which would allow users to sign up with any email address.
If login works in your preview but not on your published app, see our troubleshooting login guide. This is usually related to third-party cookie settings in the browser.
The preview environment is different from your published app. Login issues in preview due to cookies don’t affect your published app.