2023-11-19 14:30:22 +08:00
|
|
|
import {
|
|
|
|
type CreateSsoConnector,
|
|
|
|
SignInIdentifier,
|
|
|
|
demoAppApplicationId,
|
|
|
|
SsoProviderName,
|
|
|
|
} from '@logto/schemas';
|
2023-09-12 18:42:15 +08:00
|
|
|
import { appendPath, getEnv } from '@silverhand/essentials';
|
2022-06-16 13:00:01 +08:00
|
|
|
|
2023-02-06 12:14:05 +08:00
|
|
|
export const logtoUrl = getEnv('INTEGRATION_TESTS_LOGTO_URL', 'http://localhost:3001');
|
|
|
|
export const logtoConsoleUrl = getEnv(
|
|
|
|
'INTEGRATION_TESTS_LOGTO_CONSOLE_URL',
|
|
|
|
'http://localhost:3002'
|
|
|
|
);
|
2023-03-05 22:07:02 +08:00
|
|
|
export const logtoCloudUrl = getEnv('INTEGRATION_TESTS_LOGTO_CLOUD_URL', 'http://localhost:3003');
|
2023-09-12 18:42:15 +08:00
|
|
|
export const demoAppUrl = appendPath(new URL(logtoUrl), 'demo-app');
|
2022-06-16 13:00:01 +08:00
|
|
|
|
|
|
|
export const discoveryUrl = `${logtoUrl}/oidc/.well-known/openid-configuration`;
|
|
|
|
|
2022-07-21 15:32:05 +08:00
|
|
|
export const demoAppRedirectUri = `${logtoUrl}/${demoAppApplicationId}`;
|
2023-02-06 12:14:05 +08:00
|
|
|
export const adminConsoleRedirectUri = `${logtoConsoleUrl}/console/callback`;
|
2022-12-02 09:52:01 +08:00
|
|
|
|
|
|
|
export const signUpIdentifiers = {
|
|
|
|
username: [SignInIdentifier.Username],
|
|
|
|
email: [SignInIdentifier.Email],
|
2023-01-06 17:43:28 +08:00
|
|
|
sms: [SignInIdentifier.Phone],
|
|
|
|
emailOrSms: [SignInIdentifier.Email, SignInIdentifier.Phone],
|
2022-12-02 09:52:01 +08:00
|
|
|
none: [],
|
|
|
|
};
|
2023-05-22 13:31:45 +08:00
|
|
|
|
2023-10-26 18:03:16 +08:00
|
|
|
export const consoleUsername = 'svhd';
|
|
|
|
export const consolePassword = 'silverhandasd_1';
|
2023-10-09 11:44:03 +08:00
|
|
|
export const mockSocialAuthPageUrl = 'http://mock.social.com';
|
2023-10-31 17:52:27 +08:00
|
|
|
|
2023-11-08 16:55:45 +08:00
|
|
|
export const newOidcSsoConnectorPayload = {
|
2023-11-02 11:21:00 +08:00
|
|
|
providerName: SsoProviderName.OIDC,
|
2023-11-08 16:55:45 +08:00
|
|
|
connectorName: 'test-oidc',
|
|
|
|
domains: ['example.io'], // Auto-generated email domain
|
|
|
|
branding: {
|
|
|
|
logo: 'https://logto.io/oidc-logo.png',
|
|
|
|
darkLogo: 'https://logto.io/oidc-dark-logo.png',
|
|
|
|
},
|
|
|
|
config: {
|
|
|
|
clientId: 'foo',
|
|
|
|
clientSecret: 'bar',
|
|
|
|
issuer: `${logtoUrl}/oidc`,
|
|
|
|
},
|
|
|
|
} satisfies Partial<CreateSsoConnector>;
|