Coder Social home page Coder Social logo

jimfrenette / laravel-vuejs-jwt-auth Goto Github PK

View Code? Open in Web Editor NEW
79.0 13.0 21.0 27 KB

Using Laravel to build JSON Web Token based authentication with a Vue.js user interface

Home Page: http://jimfrenette.com/2016/11/laravel-vuejs2-jwt-auth/

PHP 67.38% JavaScript 15.01% HTML 2.97% Vue 14.64%
laravel-vuejs-jwt

laravel-vuejs-jwt-auth's Introduction

laravel-vuejs-jwt-auth

Using Laravel to build JSON Web Token based authentication with a Vue.js 2.x user interface

http://jimfrenette.com/2016/11/laravel-vuejs2-jwt-auth/

Versions used for this build

  • Laravel 5.2
  • JWT Auth v0.5.9
  • Nodejs v6.9.4
  • NPM v3.10.10
  • Vue v2.1.1
  • Vue-cli v2.8.1
  • Vue-resource v1.2.0
  • Vue-router v2.1.0
  • Webpack v2.2.0

Refer to the resources/package.json for more info

TODO

Refresh Tokens

The current user's access token is refreshed. This case can happen in the following conditions:

  • The access token expires: this is a common situation. The refresh token is used to get a new valid set of tokens.
  • The user changes his password: Server issues new refresh tokens and renders the old tokens expired.
  • The user re-authenticates: some actions require that the user's credentials are recently issued; such actions include deleting an account, setting a primary email address, and changing a password. Instead of signing out the user and then signing in the user again, get new credentials from the user, and pass the new credentials to the reauthenticate method of the User object.

laravel-vuejs-jwt-auth's People

Contributors

jimfrenette avatar jimfrenette-icrossing avatar nandordudas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-vuejs-jwt-auth's Issues

ready() not work

With Vue2, you need mounted() instead of ready() on laravel-vuejs-jwt-auth/resources/assets/components/App.vue

How to handle this Vue Warning "Error when evaluating expression auth.user.profile.*"

This not an issue on the current build of branch 1.0 but was wondering if ever you are now on Dashboard or any child component on vue router, it seems that it will render an error when route go since DOM will be rendered first before the http call on parent component, App.vue, auth.check() call. My problem is that how should we wait for the on ready function call of auth.check() on a child component route when we display something on template {{ auth.user.profile.* }} gets an error. (P.S this error won't really break the process but it's just something that I'm wondering how to handle it better)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.