S
S
shelomanovd2016-12-15 20:16:14
JavaScript
shelomanovd, 2016-12-15 20:16:14

How to determine on the client side that it is authenticated?

I am writing my own spa application.
As a server - Laravel 5.3.
Authorization from the box.
Client on vue.
After authorization passes, how can I find out later that the user is authorized? Laravel has Auth::check(), but how to do it in vue?
And how to get information about it? Auth::user->name

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
shelomanovd, 2016-12-18
@shelomanovd

i took laravel passport and oAuth

A
Alexander Aksentiev, 2016-12-15
@Sanasol

jimfrenette.com/2016/09/laravel-vuejs-jwt-auth
jimfrenette.com/2016/09/laravel-vuejs-jwt-auth/2 or
_
forget about this crap, authorization is checked for any request to the backend, this is enough to throw an error and the front "logged out"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question