23 lines
706 B
TypeScript
23 lines
706 B
TypeScript
import { Lock } from 'lucide-react'
|
|
import type { AuthProvider } from './_types'
|
|
|
|
/**
|
|
* Auth0 — default provider. Universal login gives email + password out of
|
|
* the box; social providers (GitHub / Google / etc.) configured on the
|
|
* Auth0 tenant side, not in this file.
|
|
*
|
|
* Secrets (`AUTH0_DOMAIN`, `AUTH0_CLIENT_ID`, `AUTH0_CLIENT_SECRET`) are
|
|
* read by the backend via `secrets.getSecret()`. This client file never
|
|
* sees them.
|
|
*/
|
|
export const auth0: AuthProvider = {
|
|
id: 'auth0',
|
|
labelKey: 'auth:providers.auth0',
|
|
Icon: Lock,
|
|
tone: 'primary',
|
|
envVars: ['AUTH0_DOMAIN', 'AUTH0_CLIENT_ID', 'AUTH0_CLIENT_SECRET'],
|
|
login: () => {
|
|
window.location.href = '/auth/auth0/login'
|
|
},
|
|
}
|