Quickstart
Get a full BrownieGate login flow running in minutes.
1. Create a project
- Go to the BrownieGate dashboard
- Create a new project
- Set your callback URL (e.g.
https://yourapp.com/auth/callback) - Copy the following values:
- Project UUID
- API key
- Encryption key
2. Add a “Login with BrownieGate” button
Redirect the user to the BrownieGate authentication endpoint from your frontend:
<a href="https://browniegate.com/auth?project_uuid=PROJECT_UUID">
Login with BrownieGate
</a>
After authentication, the user will be redirected back to your callback URL with an encrypted payload.
3. Handle the callback (server-side)
Your callback endpoint receives an encrypted payload containing a one-time code and timestamp.
{
"payload": "ENCRYPTED_STRING"
}
Decrypt it using your project's encryption key.
4. Verify the login
Send the one-time code to BrownieGate for verification (server-to-server):
- Endpoint:
/api/user/validate - Headers:
project-uuid,authorization - Query param:
code
On success, BrownieGate returns the authenticated user_id.
5. Fetch user data (optional)
Retrieve user information the user has consented to:
/api/user/get_data/api/user/get_pfp
Only fields enabled in your project's services configuration will be returned.
6. Create a session
After verification, establish a session in your app:
- Set your own secure HttpOnly cookie, or
- Use
/api/cookie/generateto create a BrownieGate session cookie
Your user is now logged in 🎉
Next steps
- Check the SDKs for ready-made helpers
- Read the API Reference
- See the example repositories in the Documentation page