1
1
100R2019-02-14 09:30:22
Laravel
100R, 2019-02-14 09:30:22

How to correctly issue a Token in Laravel?

Tell me, is it right to create a Personal Access Token immediately when registering or authorizing a user, or is this not acceptable and you need to bother with registering client_id, client_secret, code, etc.? As part of the study, I'm trying to create registration and authorization on the site through the API. Laravel Passport + Vue. I would like to understand in the right direction I'm moving or not.

$user->createToken('Personal Access Token');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tvsjke, 2019-02-14
@tvsjke

Why do you need a passport here? Are you creating a public API, or do you need applications to communicate with each other?
Take the usual jwt and go

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question