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

I want to set user information login with. #214

Closed
dasisyouyu opened this issue Jul 3, 2018 · 3 comments
Closed

I want to set user information login with. #214

dasisyouyu opened this issue Jul 3, 2018 · 3 comments
Labels

Comments

@dasisyouyu
Copy link

dasisyouyu commented Jul 3, 2018

API

/api/auth/

{
 "token": "uniq token",
 "username": "name",
 "email": "email"
}

nuxt

nuxt.config.js

strategies: {
  local: {
    endpoints: {
            login: { url: 'approval/auth', method: 'post'},
            logout: false,
            user: false,
          },

login.vue

await this.$auth.loginWith('local', { data: this.form })
        .then(response => {
          this.$nuxt.$router.push('/')
          this.$axios.setToken(this.$auth.getToken(this.$auth.strategy.name))
          this.$auth.fetchUser();
          console.log(this.$auth.strategy)

i Viewed.
#144 (comment)

This question is available on Nuxt community (#c171)
@ghost ghost closed this as completed Jul 3, 2018
@ghost ghost added the cmty:question label Jul 3, 2018
@ghost
Copy link

ghost commented Jul 3, 2018

This issue as been imported as question since it does not respect auth-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/auth-module/issues/c171.

@dasisyouyu
Copy link
Author

i want use it like this "this.$auth.user.username'

@rikoz
Copy link

rikoz commented Aug 24, 2018

Hello no answer yet?

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

No branches or pull requests

3 participants