Loading...
Was this page helpful?
This documentation provides a reference to the sdk.auth.register
method used to send requests to Medusa's Authentication API routes. It can be used for admin users, customers, or custom actor types.
This method is used to retrieve a registration JWT token for a user, customer, or custom actor type. It sends a request to the Retrieve Registration Token API route.
Then, it stores the returned token and passes it in the header of subsequent requests. So, you can call the store.customer.create method, for example, after calling this method.
Learn more in the JS SDK Authentication guide.
actor
stringuser
for admin user, or customer
for customer.method
stringemailpass
or google
.payload
AdminSignUpWithEmailPassword | Record<string, unknown>emailpass
provider,
you pass the email and password.Promise
Promise<string>