Vue SPA + laravel Passport: how to authenticate properly? [closed]

流过昼夜 提交于 2020-01-23 03:06:03

问题


I'm trying to figure out what's the correct way to authenticate users with Passport for a Vue SPA. I can't figure out which grant type I should use considering that implicit grant is not recommended by IETF’s OAuth working group and the other methods require to pass the client_secret with the request, I'm a bit lost...

I was thinking password grant but I receive a refresh token and it’s not really secure to store it in the localstorage.

I also thought about the cookie injected by laravel passport in every request but I can’t find out how to login from my SPA with this approach...

Any lead on what’s the best / more secure way to do this ?

Thanks!

来源:https://stackoverflow.com/questions/56155367/vue-spa-laravel-passport-how-to-authenticate-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!