簡體   English   中英

身份驗證 - 在會話和基於令牌的身份驗證之間共享相同的經過身份驗證的用戶

[英]Auth - share the same authenticated user between session and token based auth

我正在尋找實現身份驗證系統- 使用 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)

我主要關心的是如何在 web 部件和 api 之間共享(以安全和最佳方式)身份驗證用戶(同一用戶)?

我有什么選擇?

如果你需要更多的澄清請不要猶豫問,任何幫助表示贊賞

您可以使用 JWT 身份驗證。 它是一種基於令牌的身份驗證,對 Web 和 API 都很有用。

您可以在https://jwt.io/introduction/找到更多信息

&

以下鏈接也可以幫助您https://laravel.com/docs/5.5/authentication https://laravel.com/docs/5.5/passport

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM