Home > @vsf-enterprise/ct-auth0
# ct-auth0 package
# Functions
| Function | Description |
|---|---|
| isAuthenticated({ $vsf, redirect, req }) | Nuxt.js middleware preventing unauthenticated customers from accessing protected routes |
| useAuth0() | useAuth0 composable complements the useUser composable from the Commercetools integration. It redirects users on login(), logout(), register(), and changePassword() instead of sending requests to commercetools |
# Interfaces
| Interface | Description |
|---|---|
| ApiConfiguration | Configuration for the api key in Configuration object |
| Configuration | Server Middleware configuration for the package |
| CustomerUpdateParams | Parameters of the updateUser method in useUser |
| LoginParams | Parameters of the login method in useUser |
| RegisterParams | Parameters of the register method in useUser |
| UseAuth0 | useAuth0 composable |
# Variables
| Variable | Description |
|---|---|
| API_URL_PREFIX | Prefix for all API URLs |
| AUTH0_CALLBACK_URL | Unprefixed URL to the callback endpoint |
| AUTH0_LOGIN_URL | Unprefixed URL to the login endpoint |
| AUTH0_LOGOUT_URL | Unprefixed URL to the logout endpoint |
| AUTH0_PASSWORD_RESET_URL | Unprefixed URL to the password reset endpoint |
| AUTH0_POST_LOGOUT_URL | Unprefixed URL to the post logout endpoint |
| AUTH0_REGISTER_URL | Unprefixed URL to the registration endpoint |
| DEFAULT_CT_COOOKIE | Name of the cookie used by the commercetools integration |
← useAuth0