C
C
copal2015-12-26 22:26:58
Laravel
copal, 2015-12-26 22:26:58

What gives the use of Auth?

I'm making my first web application and a little thought fled. I am using laravel as api + using jwt which already has methods for authentication. Also, if I understand correctly, I do not need sessions and other things, such as a session token.
Hence the question arose - is it necessary to use the built-in Auth at all?
I reason like this .. Write a registration method, a matter of five seconds, authorization and authentication are already half written. But what do I lose by removing it? And can it be removed at all?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2015-12-26
@Nc_Soft

For api use token

V
Vyacheslav Plisko, 2015-12-27
@AmdY

The standard mechanism for sessions with cookies is convenient for the browser, since you do not need to transfer the token yourself. You can override the methods for Auth to validate the jwt token and use the standard mechanism to not produce additional entities.
I advise you to look at the package https://github.com/tymondesigns/jwt-auth/wiki/Auth... so that you yourself have to write less

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question