Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ramigs/nuxt-auth

Open more actions menu

Repository files navigation

nuxt-auth

Nuxt Strapi Auth

Build Setup

# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

# generate static project
$ npm run generate

For detailed explanation on how things work, check out Nuxt.js docs.

Usage with @nuxtjs/auth-next module

If you are using the auth-next module you have to change your nuxt.config.js module to work with the strapi user API.

strategies: {
  local: {
    token: {
      property: 'jwt',
    },
    endpoints: {
      login: {
        url: 'auth/local',
        method: 'post',
        propertyName: 'jwt',
      },
      user: {
        url: 'users/me',
        method: 'get',
        // no propertyName: false here. Moved to specific user field below
      },
      logout: false,
    },
    user: {
      property: false,
    },
  },
},

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.