mercredi 17 janvier 2018

Create token (password grant) for user directly without password (REST API Laravel)

everyone! First, sorry if such issue is already was. And sorry for my English... I am newer at laravel and I like it. Now I learning how to create REST API app and for this I use laravel/passport. And my target is to make social networks authorize via API. How it should work:

  1. Client app, for example - mobile app, must send me (my app at laravel) request with Google token (for example).
  2. From receive token I get the data about user, save it or find already existent.
  3. After that I must send a token (from my app, not Google one), refresh token and expires_at.

Of course in normal api auth I use password_grant where you must do request with login and password, and it generate token, refresh token,expires_at. But how to do it if you have not password? How to create token, refresh token and expires_at for special user? I know about personal tokens, but it only 'longlive' token? It make no sense! Why is not exist personal token that go with refresh token and expires_at or password token where you can create it directly? Is there are some right solution? Will be solution in a future version of laravel/passport?

I will be very thankful if you can advise some really good solution.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2Dkwv8M
via IFTTT

Aucun commentaire:

Enregistrer un commentaire