0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(cloud): correct initial redirect uris (#3529)

This commit is contained in:
Gao Sun 2023-03-20 14:32:04 +08:00 committed by GitHub
parent 34927dcdc4
commit a336de7938
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,7 @@ import {
createAdminDataInAdminTenant,
} from '@logto/schemas';
import { createTenantMetadata, DemoConnector } from '@logto/shared';
import { appendPath } from '@silverhand/essentials';
import type { ZodType } from 'zod';
import { z } from 'zod';
@ -160,9 +161,7 @@ export class TenantsLibrary {
// Update Redirect URI for Admin Console
await tenants.appendAdminConsoleRedirectUris(
...['http://localhost:3003', 'https://cloud.logto.dev'].map(
(endpoint) => new URL(`/${tenantModel.id}/callback`, endpoint)
)
...cloudUrlSet.deduplicated().map((url) => appendPath(url, tenantModel.id, 'callback'))
);
await transaction.end();