From 7bedc68e3e6b1053d0d29dec74ec9eb74e0634ea Mon Sep 17 00:00:00 2001 From: kushalshit27 <43465488+kushalshit27@users.noreply.github.com> Date: Mon, 27 Jan 2025 11:28:17 +0530 Subject: [PATCH] added attributes schema for email, phone number, and username in database schema --- src/tools/auth0/handlers/databases.ts | 72 +++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/src/tools/auth0/handlers/databases.ts b/src/tools/auth0/handlers/databases.ts index ce16845a..b970ea62 100644 --- a/src/tools/auth0/handlers/databases.ts +++ b/src/tools/auth0/handlers/databases.ts @@ -25,6 +25,78 @@ export const schema = { ), }, }, + attributes: { + type: 'object', + properties: { + email: { + type: 'object', + properties: { + identifier: { + type: 'object', + properties: { + active: { type: 'boolean' }, + }, + }, + profile_required: { type: 'boolean' }, + verification_method: { type: 'string', enum: ['otp', 'link'] }, + signup: { + type: 'object', + properties: { + status: { type: 'string', enum: ['required', 'optional', 'inactive'] }, + verification: { + type: 'object', + properties: { + active: { type: 'boolean' }, + }, + }, + }, + }, + }, + }, + phone_number: { + type: 'object', + properties: { + identifier: { + type: 'object', + properties: { + active: { type: 'boolean' }, + }, + }, + profile_required: { type: 'boolean' }, + signup: { + type: 'object', + properties: { + status: { type: 'string', enum: ['required', 'optional', 'inactive'] }, + verification: { + type: 'object', + properties: { + active: { type: 'boolean' }, + }, + }, + }, + }, + }, + }, + username: { + type: 'object', + properties: { + identifier: { + type: 'object', + properties: { + active: { type: 'boolean' }, + }, + }, + profile_required: { type: 'boolean' }, + signup: { + type: 'object', + properties: { + status: { type: 'string', enum: ['required', 'optional', 'inactive'] }, + }, + }, + }, + }, + }, + }, }, }, },