Loading...
Was this page helpful?
This documentation provides a reference to the updateProvider
method. This belongs to the Auth Module.
This method updates an auth identity's details using the provider that created it. It uses the update
method of the
underlying provider, passing it the providerData
parameter as a parameter. The method
returns the data returned by the provider.
The following example is in the context of an API route, where
req
is an instance of the MedusaRequest
object:
1const { success, authIdentity, location, error } =2 await authModuleService.updateProvider("emailpass", {3 email: "user@example.com",4 password: "password",5 // The ID of a user, customer, or custom actor type that is being updated.6 // For example, `user_123`.7 entity_id: req.auth_context.actor_id,8 })
provider
stringproviderData
Record<string, unknown>Promise
Promise<AuthenticationResponse>