mirror of
https://github.com/luxfi/mpc.git
synced 2026-09-24 00:26:24 +00:00
- Add OIDC token exchange endpoint (POST /api/v1/auth/oidc) that validates Lux ID access tokens and issues local MPC API JWTs - Update dashboard auth callback to do 2-step exchange: get Lux ID token, then exchange for MPC API JWT via OIDC endpoint - Fix IngressRoute to use path-based routing (/api/v1 → API, / → dashboard) - Fix deploy.yml to target lux-k8s cluster (not hanzo-k8s) - Fix wallet creation page to use api client instead of raw fetch - Add /api and /healthz to dashboard middleware public paths
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
export interface Branding {
|
|
brand: string
|
|
logoText: string
|
|
description: string
|
|
iamUrl: string
|
|
iamClientId: string
|
|
iamLabel: string
|
|
}
|
|
|
|
export const brandingConfig: Record<string, Branding> = {
|
|
'mpc.lux.network': {
|
|
brand: 'Lux MPC',
|
|
logoText: 'Lux MPC',
|
|
description: 'Multi-Party Computation Wallet Platform by Lux Network',
|
|
iamUrl: 'https://lux.id',
|
|
iamClientId: 'lux-mpc',
|
|
iamLabel: 'Lux ID',
|
|
},
|
|
'mpc.pars.network': {
|
|
brand: 'Pars MPC',
|
|
logoText: 'Pars MPC',
|
|
description: 'Multi-Party Computation Wallet Platform by Pars Network',
|
|
iamUrl: 'https://pars.id',
|
|
iamClientId: 'pars-mpc',
|
|
iamLabel: 'Pars ID',
|
|
},
|
|
'mpc.zoo.network': {
|
|
brand: 'Zoo MPC',
|
|
logoText: 'Zoo MPC',
|
|
description: 'Multi-Party Computation Wallet Platform by Zoo Network',
|
|
iamUrl: 'https://id.zoo.network',
|
|
iamClientId: 'zoo-mpc',
|
|
iamLabel: 'Zoo ID',
|
|
},
|
|
'cloud.lux.network': {
|
|
brand: 'Lux Cloud',
|
|
logoText: 'Lux Cloud',
|
|
description: 'Cloud Wallet Management by Lux Network',
|
|
iamUrl: 'https://lux.id',
|
|
iamClientId: 'lux-mpc',
|
|
iamLabel: 'Lux ID',
|
|
},
|
|
}
|
|
|
|
const defaultBranding: Branding = brandingConfig['mpc.lux.network']
|
|
|
|
/** Pure function — works in both server and client contexts. */
|
|
export function getBranding(hostname: string): Branding {
|
|
const host = hostname.split(':')[0]
|
|
return brandingConfig[host] ?? defaultBranding
|
|
}
|