Skip to main content
Skip to main content

create - Auth Module Reference

This documentation provides a reference to the create method. This belongs to the Auth Module.

create(data, sharedContext?): Promise<AuthUserDTO[]>

This method creates auth users.

Example

const authUsers = await authModuleService.create([
{
provider: "emailpass",
entity_id: "user@example.com",
scope: "admin",
},
{
provider: "google",
entity_id: "user@gmail.com",
scope: "email profile",
},
])

Parameters

dataCreateAuthUserDTO[]Required
The auth users to be created.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<AuthUserDTO[]>Required
The created auth users.

create(data, sharedContext?): Promise<AuthUserDTO>

This method creates an auth user.

Example

const authUser = await authModuleService.create({
provider: "emailpass",
entity_id: "user@example.com",
scope: "admin",
})

Parameters

dataCreateAuthUserDTORequired
The auth user to be created.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<AuthUserDTO>Required
The created auth user.
Was this section helpful?