feat: onboarding pre-work
This commit is contained in:
@@ -9,6 +9,7 @@ import { logger } from '../logging/logger';
|
||||
interface CreateUserParams {
|
||||
email: string;
|
||||
password: string;
|
||||
emailVerified?: boolean; // Optional: set true for trusted users (e.g., CLI-created admins)
|
||||
}
|
||||
|
||||
interface UserDetails {
|
||||
@@ -46,7 +47,7 @@ class Auth0ManagementClientSingleton {
|
||||
* @param password User's password
|
||||
* @returns Auth0 user ID
|
||||
*/
|
||||
async createUser({ email, password }: CreateUserParams): Promise<string> {
|
||||
async createUser({ email, password, emailVerified = false }: CreateUserParams): Promise<string> {
|
||||
try {
|
||||
const client = this.getClient();
|
||||
|
||||
@@ -54,7 +55,7 @@ class Auth0ManagementClientSingleton {
|
||||
connection: this.CONNECTION_NAME,
|
||||
email,
|
||||
password,
|
||||
email_verified: false,
|
||||
email_verified: emailVerified,
|
||||
});
|
||||
|
||||
const user = response.data;
|
||||
|
||||
Reference in New Issue
Block a user