fix and update
This commit is contained in:
@@ -38,7 +38,9 @@ function buildFedcmEndpointUrls(issuer: string, frontendUrl: string) {
|
||||
accountsEndpoint: `${base}/fedcm/accounts`,
|
||||
clientMetadataEndpoint: `${base}/fedcm/client_metadata`,
|
||||
idAssertionEndpoint: `${base}/fedcm/id_assertion`,
|
||||
loginUrl: `${front}/auth/login`,
|
||||
// FedCM: login_url MUST be same-origin with config.json (W3C FedCM / Chrome).
|
||||
// На split-domain UI проксируется через nginx: api.idpmvk.lpr/auth/login → frontend.
|
||||
loginUrl: `${base}/auth/login`,
|
||||
signupUrl: `${front}/auth/register`,
|
||||
webIdentityUrl: `${webIdentityOrigin}/.well-known/web-identity`
|
||||
};
|
||||
@@ -102,15 +104,16 @@ export async function resolveFedcmEndpoints(core: CoreGrpcService, _req?: Reques
|
||||
}
|
||||
|
||||
export function buildFedcmProviderConfig(endpoints: FedcmEndpoints) {
|
||||
const base = normalizePublicBaseUrl(endpoints.issuer);
|
||||
return {
|
||||
accounts_endpoint: endpoints.accountsEndpoint,
|
||||
client_metadata_endpoint: endpoints.clientMetadataEndpoint,
|
||||
id_assertion_endpoint: endpoints.idAssertionEndpoint,
|
||||
accounts_endpoint: `${base}/fedcm/accounts`,
|
||||
client_metadata_endpoint: `${base}/fedcm/client_metadata`,
|
||||
id_assertion_endpoint: `${base}/fedcm/id_assertion`,
|
||||
login_url: endpoints.loginUrl,
|
||||
branding: {
|
||||
background_color: '#ffffff',
|
||||
color: '#1f2430',
|
||||
icons: [{ url: `${endpoints.frontendUrl}/favicon.ico`, size: 32 }]
|
||||
icons: [{ url: `${base}/favicon.ico`, size: 32 }]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user