2023-11-08 03:55:45 -05:00
|
|
|
import { type CreateSsoConnector, SignInIdentifier, demoAppApplicationId } from '@logto/schemas';
|
2023-09-12 05:42:15 -05:00
|
|
|
import { appendPath, getEnv } 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');
|
|
|
|
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`;
|
|
|
|
|
2022-07-21 02:32:05 -05:00
|
|
|
export const demoAppRedirectUri = `${logtoUrl}/${demoAppApplicationId}`;
|
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';
|
2023-10-08 22:44:03 -05:00
|
|
|
export const mockSocialAuthPageUrl = 'http://mock.social.com';
|
2023-10-31 04:52:27 -05:00
|
|
|
|
|
|
|
// @see {@link packages/core/src/sso/types}
|
|
|
|
export enum ProviderName {
|
|
|
|
OIDC = 'OIDC',
|
|
|
|
}
|
2023-11-08 03:55:45 -05:00
|
|
|
|
|
|
|
export const newOidcSsoConnectorPayload = {
|
|
|
|
providerName: ProviderName.OIDC,
|
|
|
|
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>;
|