T
T
tvsjke2018-07-30 11:58:06
Laravel
tvsjke, 2018-07-30 11:58:06

How to make authorization through Laravel Passport?

Task: we need to make a secure API so that, say, only my front application can access it.
After reading the documentation, I realized that I needed to use Password Grant. OK.
Now questions:
- It turns out that for each of my applications I need to create a client and user, and associate them? The documentation contains only an example of a request

'client_id' => 'client-id',
        'client_secret' => 'client-secret',
        'username' => '[email protected]',
        'password' => 'my-password',

and it is not clear (to me) how client_id and user credentials are related

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kuznetsov, 2018-07-30
@dima9595

client_id is the id of the API key. credentials is used for server-server communication, which is not suitable for your task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question