authenticate - Auth Module Reference
This documentation provides a reference to the authenticate
method. This belongs to the Auth Module.
This method is used to authenticate a user using a provider. The authenticate
method of the
underlying provider is called, passing it the providerData
parameter as a parameter. The method
returns the data returned by the provider.
Refer to this guide to learn more about the authentication flows.
Example
The following example is in the context of an API route, where
req
is an instance of the MedusaRequest
object:
Parameters
provider
stringRequiredThe ID of the provider to authenticate the user with.
The data to pass to the provider to authenticate the user.
Returns
The details of the authentication result.
Was this section helpful?