chore: seminarhof customer project

This commit is contained in:
e2e
2026-06-21 22:23:43 +02:00
commit e0331cbb1c
161 changed files with 18517 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import type { ComponentType } from 'react'
/**
* Shape every auth provider file exports.
*
* Providers are shadcn-style: copy from `providers/*.ts.inactive` into an
* active `.ts` file and register in `auth.config.ts`. Backend OAuth routes
* live in `@project/functions/src/auth/*`.
*/
export interface AuthProvider {
id: 'auth0' | 'email' | 'github' | 'google' | 'microsoft' | 'passwordless'
labelKey: string
Icon: ComponentType<{ size?: number | string }>
/** Variant tone used for provider button treatment. */
tone: 'primary' | 'secondary' | 'default'
/** Required env var names — surfaced by the console's auth browser. */
envVars: string[]
/** Kicks off the login flow. May redirect (OAuth) or open a modal (email). */
login(): Promise<void> | void
}

View File

@@ -0,0 +1,22 @@
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'
},
}

View File

@@ -0,0 +1,13 @@
import { Github } from 'lucide-react'
import type { AuthProvider } from './_types'
export const github: AuthProvider = {
id: 'github',
labelKey: 'auth:providers.github',
Icon: Github,
tone: 'default',
envVars: ['GITHUB_CLIENT_ID', 'GITHUB_CLIENT_SECRET'],
login: () => {
window.location.href = '/auth/github/login'
},
}

View File

@@ -0,0 +1,13 @@
import { Chrome } from 'lucide-react'
import type { AuthProvider } from './_types'
export const google: AuthProvider = {
id: 'google',
labelKey: 'auth:providers.google',
Icon: Chrome,
tone: 'default',
envVars: ['GOOGLE_CLIENT_ID', 'GOOGLE_CLIENT_SECRET'],
login: () => {
window.location.href = '/auth/google/login'
},
}

View File

@@ -0,0 +1,13 @@
import { KeyRound } from 'lucide-react'
import type { AuthProvider } from './_types'
export const microsoft: AuthProvider = {
id: 'microsoft',
labelKey: 'auth:providers.microsoft',
Icon: KeyRound,
tone: 'default',
envVars: ['MS_CLIENT_ID', 'MS_CLIENT_SECRET', 'MS_TENANT_ID'],
login: () => {
window.location.href = '/auth/microsoft/login'
},
}

View File

@@ -0,0 +1,13 @@
import { Fingerprint } from 'lucide-react'
import type { AuthProvider } from './_types'
export const passwordless: AuthProvider = {
id: 'passwordless',
labelKey: 'auth:providers.passwordless',
Icon: Fingerprint,
tone: 'default',
envVars: ['SMTP_HOST', 'SMTP_USER', 'SMTP_PASS'],
login: () => {
window.location.href = '/auth/passwordless/request'
},
}