Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: auth init #234

Merged
merged 2 commits into from
Nov 1, 2018
Merged

fix: auth init #234

merged 2 commits into from
Nov 1, 2018

Conversation

gotoin
Copy link
Contributor

@gotoin gotoin commented Aug 29, 2018

hello, i found and fixed a bug.

if the this.mounted() throw an exception,this.$storage.watchState not be called

@gotoin
Copy link
Contributor Author

gotoin commented Aug 29, 2018

config:

auth: {
    strategies: {
      local: {
        endpoints: {
          ...
        },
        tokenRequired: false, // set false
      },
    },
  }

./lib/schemes/local.js

  async fetchUser (endpoint) {
   ...
    
    // maybe the request return not 200 status
    const user = await this.$auth.requestWith(
        this.name,
        endpoint,
        this.options.endpoints.user
      )
    this.$auth.setUser(user)
  }

lib/core/auth.js Outdated Show resolved Hide resolved
lib/core/auth.js Outdated Show resolved Hide resolved
@pi0 pi0 changed the base branch from dev to master November 1, 2018 13:53
@pi0 pi0 changed the base branch from master to dev November 1, 2018 13:54
@pi0 pi0 merged commit 03dba23 into nuxt-community:dev Nov 1, 2018
This was referenced May 23, 2019
@pi0
Copy link
Member

pi0 commented May 30, 2019

This PR has been published in v4.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants