Skip to content

Commit

Permalink
feat(cli): update seeder (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
nnorbert authored Jun 11, 2024
1 parent c18578e commit cb4cc99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/cli/src/commands/database/ogcio/ogcio-seeder.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -414,7 +414,7 @@
"social_sign_in_connector_targets": [
"MyGovId (MyGovId connector)"
],
"sign_in_mode": "SignIn"
"sign_in_mode": "SignInAndRegister"
}],
"webhooks": [{
"id": "login_webhook",
Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/libraries/ogcio-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -147,6 +148,10 @@ export const manageDefaultUserRole = async (
getRoles: (roleName: string, excludeRoleId?: string) => Promise<Role | undefined>,
insertUsersRoles: (usersRoles: CreateUsersRole[]) => Promise<QueryResult<QueryResultRow>>
) => {
if (user.tenantId === adminTenantId) {
return;
}

assertThat(Boolean(user.primaryEmail), 'user.email_not_exist');

if (user.primaryEmail === null) {
Expand Down

0 comments on commit cb4cc99

Please sign in to comment.