[英]Auth - share the same authenticated user between session and token based auth
I'm looking to implement an auth systeme - working with laravel 5.5 ( php ) , this is my situation:我正在寻找实现身份验证系统- 使用 laravel 5.5 ( php ) ,这是我的情况:
myApp |--> administration (web auth) -no problem i will use the session based auth- | |--> users have two parts |-->first part where there are forms, listing ... |-->api part (client space built with react)
My main concern is how to share (in a secure and best way) the auth user (same one) between the web part and api one?我主要关心的是如何在 web 部件和 api 之间共享(以安全和最佳方式)身份验证用户(同一用户)?
what options do i have ?我有什么选择?
If y need more clarification plz do not hesitate to ask, Any help is appreciated
如果你需要更多的澄清请不要犹豫问,任何帮助表示赞赏
You can with for JWT Authentication.您可以使用 JWT 身份验证。 It is a token based authentication useful for both web and API's.
它是一种基于令牌的身份验证,对 Web 和 API 都很有用。
You can find more at https://jwt.io/introduction/您可以在https://jwt.io/introduction/找到更多信息
& &
Also the following links may help you https://laravel.com/docs/5.5/authentication https://laravel.com/docs/5.5/passport以下链接也可以帮助您https://laravel.com/docs/5.5/authentication https://laravel.com/docs/5.5/passport
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.