Answer the question
In order to leave comments, you need to log in
Laravel + passport how to register a user correctly?
I did not find user cases on how to properly use the passport in relation to users.
Do I understand correctly that I create a user in "users", and then in "oauth_clients" I create a new client with the id of the created user?
The question is due to the fact that maybe there are already some ready-made facades, middleware, interfaces where everything is already ready, and I will start to crutch.
Also, is there any detailed analysis of how the passport works? Why so many tables, how does he use them?
Answer the question
In order to leave comments, you need to log in
Who seeks will always find.
Even in Russian - https://laravel.demiart.ru/create-rest-api-with-au...
And if you try, you can find an even simpler solution that will be enough for you https://github.com/ laravel/airlock
No. You don't have to do anything with your hands. Here everything is chewed https://laravel.ru/docs/v5/passport
To understand why there are so many tables, you need to understand what for what and for what. How oauth and oauth2 work
You can use Password Grant Tokens , after creating a user, get access and refresh tokens once by login / password, and then use them.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question