Skip to main content

Authentication Methods

Granite supports two authentication methods:

Magic Link

Passwordless email authentication

Google OAuth

Sign in with your Google account
Both methods are powered by Stytch, an enterprise-grade authentication provider.

How It Works

Session Management

After authentication:
  • Session cookie stored securely (HTTP-only)
  • Valid for 7 days by default
  • Automatic refresh on activity
  • Secure logout clears the session

Multi-Organization Support

One account can belong to multiple organizations:
  • Same email, different orgs
  • Switch between orgs instantly
  • Separate permissions per org

API Authentication

For programmatic access, use API keys instead of user sessions:
curl -X POST "https://api.getgranite.ai/api/your-org/endpoint" \
  -H "X-Granite-API-Key: gk_live_abc123..."
See API Management for details.

Security Features

FeatureDescription
HTTP-only cookiesSession tokens can’t be accessed by JavaScript
HTTPS onlyAll traffic encrypted in transit
Session expirationAutomatic logout after inactivity
Single logoutSign out from all devices

Next Steps