diff --git a/packages/cli/src/commands/database/ogcio/ogcio-seeder.json b/packages/cli/src/commands/database/ogcio/ogcio-seeder.json index cfc720ecc4c..11220ceea67 100644 --- a/packages/cli/src/commands/database/ogcio/ogcio-seeder.json +++ b/packages/cli/src/commands/database/ogcio/ogcio-seeder.json @@ -369,14 +369,14 @@ "sync_profile": false, "connector_id": "mygovid", "config": { - "scope": "openid profile email client_123", - "clientId": "client_123", - "clientSecret": "client_secret_123", - "tokenEndpoint": "http://localhost:3005/token", - "authorizationEndpoint": "http://localhost:3005/auth", + "scope": "openid profile email 2xz6sbi8ch01uhjt1oq8r", + "clientId": "2xz6sbi8ch01uhjt1oq8r", + "clientSecret": "bgHz4Ouv2lxXCdc6s6s4IUoNpFAklC15", + "tokenEndpoint": "http://localhost:3005/mock/token", + "authorizationEndpoint": "http://localhost:3005/mock/auth", "tokenEndpointAuthMethod": "client_secret_post", "idTokenVerificationConfig": { - "jwksUri": "http://localhost:3005/jws" + "jwksUri": "http://localhost:3005/mock/keys" }, "clientSecretJwtSigningAlgorithm": "HS256" }, @@ -414,7 +414,7 @@ "social_sign_in_connector_targets": [ "MyGovId (MyGovId connector)" ], - "sign_in_mode": "SignIn" + "sign_in_mode": "SignInAndRegister" }], "webhooks": [{ "id": "login_webhook", diff --git a/packages/core/src/libraries/ogcio-user.ts b/packages/core/src/libraries/ogcio-user.ts index bffed52f787..a796d480eda 100644 --- a/packages/core/src/libraries/ogcio-user.ts +++ b/packages/core/src/libraries/ogcio-user.ts @@ -5,6 +5,7 @@ import { type User, type Organization, type OrganizationRole, + adminTenantId, } from '@logto/schemas'; import { generateStandardId } from '@logto/shared'; import { deduplicate } from '@silverhand/essentials'; @@ -147,6 +148,10 @@ export const manageDefaultUserRole = async ( getRoles: (roleName: string, excludeRoleId?: string) => Promise, insertUsersRoles: (usersRoles: CreateUsersRole[]) => Promise> ) => { + if (user.tenantId === adminTenantId) { + return; + } + assertThat(Boolean(user.primaryEmail), 'user.email_not_exist'); if (user.primaryEmail === null) {