Created
July 30, 2020 06:12
-
-
Save techlab23/dd03862a08495574bce9b5cd8cfcb4fd to your computer and use it in GitHub Desktop.
Nuxt config for laravel sanctum integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
/* | |
** Nuxt.js modules | |
*/ | |
modules: [ | |
// Doc: https://axios.nuxtjs.org/usage | |
"@nuxtjs/axios", | |
// Doc: https://github.com/nuxt-community/auth-module | |
"@nuxtjs/auth" | |
], | |
/* | |
** Axios module configuration | |
** See https://axios.nuxtjs.org/options | |
*/ | |
axios: { | |
baseURL: "http://localhost:8000", | |
credentials: true | |
}, | |
/* | |
** Auth module configuration | |
** See https://auth.nuxtjs.org/guide/setup.html | |
*/ | |
auth: { | |
localStorage: false, | |
redirect: { | |
login: "/login", | |
logout: "/", | |
callback: "/login", | |
home: "/" | |
}, | |
strategies: { | |
local: { | |
endpoints: { | |
login: { url: "/login", method: "post" }, | |
logout: { url: "/logout", method: "post" }, | |
user: { url: "/api/user", method: "get", propertyName: "user" } | |
}, | |
tokenRequired: false, | |
tokenType: false | |
} | |
} | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment