Loading...
Was this page helpful?
This documentation provides a reference to the sdk.auth.callback
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 validate an Oauth callback from a third-party service, such as Google, for an admin user, customer, or custom actor types. It sends a request to the Validate Authentication Callback.
The method stores the returned token and passes it in the header of subsequent requests. So, you can call the store.customer.create or refresh methods, for example, after calling this method.
Learn more in the JS SDK Authentication guide.
actor
stringuser
for admin user, or customer
for customer.method
stringgoogle
.query
Record<string, unknown>Optionalcode
and state
.Promise
Promise<string>