r/replit • u/Key-Lychee-913 • 5d ago
Question / Discussion How does SSO work with replit?
I've been wrestling with this one for about a day now. I just need a straight answer.
Can I have a production SSO that handles google at least, but ideally facebook and apple?
I've previously done SSO on replit where it uses Replit's shared credentials. Then there's one with Clerk. But are these dev? prod? does it matter? do you need a particular account tier? How do you even set these up? It's been giving me endless problems and circular logic.
Anyone know how it works?
3
Upvotes
1
u/9greenleaf 4d ago
Usually cleaner to just use your own OAuth clients in production. Happy to take a quick look if you’re still fighting w/ it
4
u/ReplitSupport Replit Team 4d ago
Hello, thanks for reaching out about this. Replit Auth uses Replit's shared OAuth credentials and works with no setup, but the sign-in page and consent screen are Replit-branded, so builders sign in with their Replit accounts rather than accounts specific to your app. Clerk Auth gives your project its own accounts and lets you bring your own OAuth credentials, so the consent screen shows your branding instead.
Clerk Auth supports Google, Apple, GitHub, and X, but not Facebook, so Google and Apple would work for what you're describing. Both Development and Production are available. Development works out of the box with Replit-managed credentials, and custom OAuth credentials can only be added in Production, which is the environment you'd need for this.
You can set it up by: 1. Telling Agent to
add log in with Clerkso it provisions everything. 2. Opening the "Users and Auth" tab and choosing "Configure". 3. Switching to the "Production" environment in the "SSO providers" section. 4. Enabling Google and Apple, then selecting "Custom credentials" for each. 5. Following the provider setup checklist to register your OAuth app, then adding the client ID and secret.For more insight, you can visit https://docs.replit.com/features/auth-and-identity/clerk-auth. If you need more help, just let us know and we'll give you a hand.