Answer the question
In order to leave comments, you need to log in
How should the oauth2 protocol work?
in fact, I have to authenticate with the server, then get a bearer token, through client_id and client_secret, and my routes work without it.
Although if you delete clients from the database, then an error pops up saying create clients
. I have an api route
localhost/api/crm/login
for authorization
in postman immediately after entering the login and password, it gives out the user's bearer token and its data
would be correct to make an authentication request using client_id and client_secret,
and only then, if authenticated with the server, issue a bearer token to the user,
and if not authenticated, then show an error
.
But if you remove clients from the database, then an error pops up
. Tell me please, because of what this all can be?
Making api for mobile
Answer the question
In order to leave comments, you need to log in
OAuth is an authentication protocol using external service accounts (social networks are popular). This whole topic with the creation of client_id is needed to control third-party application developers, to be able to cancel the tokens they created in case of violation of the rules for using the service.
If your system does not require the use of accounts to enter other sites and services created by other developers, then it is not needed.
in postman immediately after entering the username and password, it issues the user's bearer token and his data
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question