mirror of
https://github.com/logto-io/logto.git
synced 2025-03-31 22:51:25 -05:00
fix(core): get tenant endpoint (#5309)
This commit is contained in:
parent
df36566633
commit
880e890321
1 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ import {
|
|||
} from '@logto/schemas';
|
||||
import { isValidSubdomain } from '@logto/shared';
|
||||
|
||||
import { EnvSet } from '#src/env-set/index.js';
|
||||
import { EnvSet, getTenantEndpoint } from '#src/env-set/index.js';
|
||||
import RequestError from '#src/errors/RequestError/index.js';
|
||||
import {
|
||||
defaultProtectedAppPageRules,
|
||||
|
@ -117,7 +117,7 @@ export const createProtectedAppLibrary = (queries: Queries) => {
|
|||
|
||||
const protectedAppConfigProviderConfig = await getProviderConfig();
|
||||
|
||||
const { protectedAppMetadata, id, secret } = await findApplicationById(applicationId);
|
||||
const { protectedAppMetadata, id, secret, tenantId } = await findApplicationById(applicationId);
|
||||
if (!protectedAppMetadata) {
|
||||
return;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ export const createProtectedAppLibrary = (queries: Queries) => {
|
|||
sdkConfig: {
|
||||
appId: id,
|
||||
appSecret: secret,
|
||||
endpoint: EnvSet.values.endpoint.href,
|
||||
endpoint: getTenantEndpoint(tenantId, EnvSet.values).origin,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue