2023-11-19 01:30:22 -05:00
|
|
|
import {
|
|
|
|
SignInIdentifier,
|
|
|
|
SsoProviderName,
|
2024-03-19 01:05:42 -05:00
|
|
|
demoAppApplicationId,
|
2024-06-16 21:30:16 -05:00
|
|
|
type CreateSsoConnector,
|
2023-11-19 01:30:22 -05:00
|
|
|
} from '@logto/schemas';
|
2024-06-16 21:30:16 -05:00
|
|
|
import { appendPath, getEnv, yes } from '@silverhand/essentials';
|
2022-06-16 00:00:01 -05:00
|
|
|
|
2023-02-05 23:14:05 -05:00
|
|
|
export const logtoUrl = getEnv('INTEGRATION_TESTS_LOGTO_URL', 'http://localhost:3001');
|
2024-02-28 01:04:29 -05:00
|
|
|
export const logtoOidcUrl = appendPath(new URL(logtoUrl), 'oidc').toString();
|
2023-02-05 23:14:05 -05:00
|
|
|
export const logtoConsoleUrl = getEnv(
|
|
|
|
'INTEGRATION_TESTS_LOGTO_CONSOLE_URL',
|
|
|
|
'http://localhost:3002'
|
|
|
|
);
|
2023-03-05 09:07:02 -05:00
|
|
|
export const logtoCloudUrl = getEnv('INTEGRATION_TESTS_LOGTO_CLOUD_URL', 'http://localhost:3003');
|
2023-09-12 05:42:15 -05:00
|
|
|
export const demoAppUrl = appendPath(new URL(logtoUrl), 'demo-app');
|
2022-06-16 00:00:01 -05:00
|
|
|
|
|
|
|
export const discoveryUrl = `${logtoUrl}/oidc/.well-known/openid-configuration`;
|
|
|
|
|
2024-03-19 01:05:42 -05:00
|
|
|
export const demoAppRedirectUri = appendPath(new URL(logtoUrl), demoAppApplicationId).href;
|
2023-02-05 23:14:05 -05:00
|
|
|
export const adminConsoleRedirectUri = `${logtoConsoleUrl}/console/callback`;
|
2022-12-01 20:52:01 -05:00
|
|
|
|
|
|
|
export const signUpIdentifiers = {
|
|
|
|
username: [SignInIdentifier.Username],
|
|
|
|
email: [SignInIdentifier.Email],
|
2023-01-06 04:43:28 -05:00
|
|
|
sms: [SignInIdentifier.Phone],
|
|
|
|
emailOrSms: [SignInIdentifier.Email, SignInIdentifier.Phone],
|
2022-12-01 20:52:01 -05:00
|
|
|
none: [],
|
|
|
|
};
|
2023-05-22 00:31:45 -05:00
|
|
|
|
2023-10-26 05:03:16 -05:00
|
|
|
export const consoleUsername = 'svhd';
|
|
|
|
export const consolePassword = 'silverhandasd_1';
|
2024-07-07 08:40:26 -05:00
|
|
|
export const mockSocialAuthPageUrl = 'http://mock-social';
|
2023-10-31 04:52:27 -05:00
|
|
|
|
2023-11-08 03:55:45 -05:00
|
|
|
export const newOidcSsoConnectorPayload = {
|
2023-11-01 22:21:00 -05:00
|
|
|
providerName: SsoProviderName.OIDC,
|
2023-11-08 03:55:45 -05:00
|
|
|
connectorName: 'test-oidc',
|
|
|
|
domains: ['example.io'], // Auto-generated email domain
|
|
|
|
branding: {
|
2023-11-27 22:34:48 -05:00
|
|
|
displayName: 'test oidc connector',
|
2023-11-08 03:55:45 -05:00
|
|
|
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>;
|
2024-06-16 21:30:16 -05:00
|
|
|
|
|
|
|
export const isDevFeaturesEnabled = yes(getEnv('DEV_FEATURES_ENABLED'));
|