Skip to content

Instantly share code, notes, and snippets.

@techlab23
Created July 30, 2020 06:12
Show Gist options
  • Save techlab23/dd03862a08495574bce9b5cd8cfcb4fd to your computer and use it in GitHub Desktop.
Save techlab23/dd03862a08495574bce9b5cd8cfcb4fd to your computer and use it in GitHub Desktop.
Nuxt config for laravel sanctum integration
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