diff --git a/packages/core/src/__mocks__/user.ts b/packages/core/src/__mocks__/user.ts index 022740b90..14bfe03f1 100644 --- a/packages/core/src/__mocks__/user.ts +++ b/packages/core/src/__mocks__/user.ts @@ -19,9 +19,11 @@ export const mockUser: User = { logtoConfig: {}, mfaVerifications: [], customData: {}, + profile: {}, applicationId: 'bar', lastSignInAt: 1_650_969_465_789, createdAt: 1_650_969_000_000, + updatedAt: 1_650_969_000_000, isSuspended: false, }; @@ -73,9 +75,11 @@ export const mockUserWithPassword: User = { customData: {}, logtoConfig: {}, mfaVerifications: [], + profile: {}, applicationId: 'bar', lastSignInAt: 1_650_969_465_789, createdAt: 1_650_969_000_000, + updatedAt: 1_650_969_000_000, isSuspended: false, }; @@ -94,9 +98,11 @@ export const mockUserList: User[] = [ customData: {}, logtoConfig: {}, mfaVerifications: [], + profile: {}, applicationId: 'bar', lastSignInAt: 1_650_969_465_000, createdAt: 1_650_969_000_000, + updatedAt: 1_650_969_000_000, isSuspended: false, }, { @@ -113,9 +119,11 @@ export const mockUserList: User[] = [ customData: {}, logtoConfig: {}, mfaVerifications: [], + profile: {}, applicationId: 'bar', lastSignInAt: 1_650_969_465_000, createdAt: 1_650_969_000_000, + updatedAt: 1_650_969_000_000, isSuspended: false, }, { @@ -132,9 +140,11 @@ export const mockUserList: User[] = [ customData: {}, logtoConfig: {}, mfaVerifications: [], + profile: {}, applicationId: 'bar', lastSignInAt: 1_650_969_465_000, createdAt: 1_650_969_000_000, + updatedAt: 1_650_969_000_000, isSuspended: false, }, { @@ -151,9 +161,11 @@ export const mockUserList: User[] = [ customData: {}, logtoConfig: {}, mfaVerifications: [], + profile: {}, applicationId: 'bar', lastSignInAt: 1_650_969_465_000, createdAt: 1_650_969_000_000, + updatedAt: 1_650_969_000_000, isSuspended: false, }, { @@ -170,9 +182,11 @@ export const mockUserList: User[] = [ customData: {}, logtoConfig: {}, mfaVerifications: [], + profile: {}, applicationId: 'bar', lastSignInAt: 1_650_969_465_000, createdAt: 1_650_969_000_000, + updatedAt: 1_650_969_000_000, isSuspended: false, }, ]; diff --git a/packages/core/src/libraries/hook/utils.ts b/packages/core/src/libraries/hook/utils.ts index f74fdc02c..79485401e 100644 --- a/packages/core/src/libraries/hook/utils.ts +++ b/packages/core/src/libraries/hook/utils.ts @@ -65,10 +65,12 @@ export const generateHookTestPayload = (hookId: string, event: HookEvent): HookE userId: 'fake-google-user-id', }, }, + profile: {}, applicationId: 'fake-application-id', isSuspended: false, lastSignInAt: now.getTime(), createdAt: now.getTime(), + updatedAt: now.getTime(), }, application: { id: 'fake-spa-application-id', diff --git a/packages/core/src/oidc/scope.test.ts b/packages/core/src/oidc/scope.test.ts index 7afff09e1..9c94a8557 100644 --- a/packages/core/src/oidc/scope.test.ts +++ b/packages/core/src/oidc/scope.test.ts @@ -5,18 +5,33 @@ const use = { userinfo: 'userinfo', } as const; +const profileExpectation = Object.freeze([ + 'name', + 'family_name', + 'given_name', + 'middle_name', + 'nickname', + 'preferred_username', + 'profile', + 'picture', + 'website', + 'gender', + 'birthdate', + 'zoneinfo', + 'locale', + 'updated_at', + 'username', + 'created_at', +]); + describe('OIDC getUserClaims()', () => { it('should return proper ID Token claims', () => { - expect(getAcceptedUserClaims(use.idToken, 'openid profile', {}, [])).toEqual([ - 'name', - 'picture', - 'username', - ]); + expect(getAcceptedUserClaims(use.idToken, 'openid profile', {}, [])).toEqual( + profileExpectation + ); expect(getAcceptedUserClaims(use.idToken, 'openid profile email phone', {}, [])).toEqual([ - 'name', - 'picture', - 'username', + ...profileExpectation, 'email', 'email_verified', 'phone_number', @@ -25,23 +40,23 @@ describe('OIDC getUserClaims()', () => { expect( getAcceptedUserClaims(use.idToken, 'openid profile custom_data identities', {}, []) - ).toEqual(['name', 'picture', 'username']); + ).toEqual(profileExpectation); expect( getAcceptedUserClaims(use.idToken, 'openid profile email', {}, ['email_verified']) - ).toEqual(['name', 'picture', 'username', 'email']); + ).toEqual([...profileExpectation, 'email']); }); it('should return proper Userinfo claims', () => { expect( getAcceptedUserClaims(use.userinfo, 'openid profile custom_data identities', {}, []) - ).toEqual(['name', 'picture', 'username', 'custom_data', 'identities']); + ).toEqual([...profileExpectation, 'custom_data', 'identities']); }); // Ignore `_claims` since [Claims Parameter](https://github.com/panva/node-oidc-provider/tree/main/docs#featuresclaimsparameter) is not enabled it('should ignore claims parameter', () => { expect( getAcceptedUserClaims(use.idToken, 'openid profile custom_data', { email: null }, []) - ).toEqual(['name', 'picture', 'username']); + ).toEqual(profileExpectation); }); }); diff --git a/packages/core/src/queries/user.test.ts b/packages/core/src/queries/user.test.ts index a556cf1e4..a7949b956 100644 --- a/packages/core/src/queries/user.test.ts +++ b/packages/core/src/queries/user.test.ts @@ -49,6 +49,7 @@ describe('user query', () => { const { table, fields } = convertToIdentifiers(Users); const databaseValue = { ...mockUser, + profile: JSON.stringify({}), identities: JSON.stringify(mockUser.identities), customData: JSON.stringify(mockUser.customData), logtoConfig: JSON.stringify(mockUser.logtoConfig), @@ -321,6 +322,7 @@ describe('user query', () => { const { connector1, ...restIdentities } = mockUser.identities; const finalDbvalue = { ...mockUser, + profile: JSON.stringify({}), identities: JSON.stringify(restIdentities), customData: JSON.stringify(mockUser.customData), logtoConfig: JSON.stringify(mockUser.logtoConfig), diff --git a/packages/phrases-experience/src/locales/de/user-scopes.ts b/packages/phrases-experience/src/locales/de/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/de/user-scopes.ts +++ b/packages/phrases-experience/src/locales/de/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/en/user-scopes.ts b/packages/phrases-experience/src/locales/en/user-scopes.ts index 6cccc23ef..4d2483eb4 100644 --- a/packages/phrases-experience/src/locales/en/user-scopes.ts +++ b/packages/phrases-experience/src/locales/en/user-scopes.ts @@ -1,15 +1,14 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { - [UserScope.CustomData]: 'Your custom data', - [UserScope.Email]: 'Your email address', - [UserScope.Phone]: 'Your phone number', - [UserScope.Profile]: 'Your name, username and avatar', - [UserScope.Roles]: 'Your roles', - [UserScope.Identities]: 'Your linked social identities', - [UserScope.Organizations]: 'Your organizations info', - [UserScope.OrganizationRoles]: 'Your organization roles', + custom_data: 'Your custom data', + email: 'Your email address', + phone: 'Your phone number', + profile: 'Your name, username, avatar, and other profile info', + roles: 'Your roles', + identities: 'Your linked social identities', + 'urn:logto:scope:organizations': 'Your organizations info', + 'urn:logto:scope:organization_roles': 'Your organization roles', + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/es/user-scopes.ts b/packages/phrases-experience/src/locales/es/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/es/user-scopes.ts +++ b/packages/phrases-experience/src/locales/es/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/fr/user-scopes.ts b/packages/phrases-experience/src/locales/fr/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/fr/user-scopes.ts +++ b/packages/phrases-experience/src/locales/fr/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/it/user-scopes.ts b/packages/phrases-experience/src/locales/it/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/it/user-scopes.ts +++ b/packages/phrases-experience/src/locales/it/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/ja/user-scopes.ts b/packages/phrases-experience/src/locales/ja/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/ja/user-scopes.ts +++ b/packages/phrases-experience/src/locales/ja/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/ko/user-scopes.ts b/packages/phrases-experience/src/locales/ko/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/ko/user-scopes.ts +++ b/packages/phrases-experience/src/locales/ko/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/pl-pl/user-scopes.ts b/packages/phrases-experience/src/locales/pl-pl/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/pl-pl/user-scopes.ts +++ b/packages/phrases-experience/src/locales/pl-pl/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/pt-br/user-scopes.ts b/packages/phrases-experience/src/locales/pt-br/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/pt-br/user-scopes.ts +++ b/packages/phrases-experience/src/locales/pt-br/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/pt-pt/user-scopes.ts b/packages/phrases-experience/src/locales/pt-pt/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/pt-pt/user-scopes.ts +++ b/packages/phrases-experience/src/locales/pt-pt/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/ru/user-scopes.ts b/packages/phrases-experience/src/locales/ru/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/ru/user-scopes.ts +++ b/packages/phrases-experience/src/locales/ru/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/tr-tr/user-scopes.ts b/packages/phrases-experience/src/locales/tr-tr/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/tr-tr/user-scopes.ts +++ b/packages/phrases-experience/src/locales/tr-tr/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/zh-cn/user-scopes.ts b/packages/phrases-experience/src/locales/zh-cn/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/zh-cn/user-scopes.ts +++ b/packages/phrases-experience/src/locales/zh-cn/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/zh-hk/user-scopes.ts b/packages/phrases-experience/src/locales/zh-hk/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/zh-hk/user-scopes.ts +++ b/packages/phrases-experience/src/locales/zh-hk/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, }; diff --git a/packages/phrases-experience/src/locales/zh-tw/user-scopes.ts b/packages/phrases-experience/src/locales/zh-tw/user-scopes.ts index 3aa9e3a2e..fb9a014a6 100644 --- a/packages/phrases-experience/src/locales/zh-tw/user-scopes.ts +++ b/packages/phrases-experience/src/locales/zh-tw/user-scopes.ts @@ -1,23 +1,23 @@ -import { UserScope } from '@logto/core-kit'; - const user_scopes = { descriptions: { /** UNTRANSLATED */ - [UserScope.CustomData]: 'Your custom data', + custom_data: 'Your custom data', /** UNTRANSLATED */ - [UserScope.Email]: 'Your email address', + email: 'Your email address', /** UNTRANSLATED */ - [UserScope.Phone]: 'Your phone number', + phone: 'Your phone number', /** UNTRANSLATED */ - [UserScope.Profile]: 'Your name, username and avatar', + profile: 'Your name, username, avatar, and other profile info', /** UNTRANSLATED */ - [UserScope.Roles]: 'Your roles', + roles: 'Your roles', /** UNTRANSLATED */ - [UserScope.Identities]: 'Your linked social identities', + identities: 'Your linked social identities', /** UNTRANSLATED */ - [UserScope.Organizations]: 'Your organizations info', + 'urn:logto:scope:organizations': 'Your organizations info', /** UNTRANSLATED */ - [UserScope.OrganizationRoles]: 'Your organization roles', + 'urn:logto:scope:organization_roles': 'Your organization roles', + /** UNTRANSLATED */ + address: 'Your address', }, };