我想連接我的angular2前端應用程序與symfony後端。所以我使用FOSOAuthServerBundle(https://github.com/FriendsOfSymfony/FOSOAuthServerBundle)授權我的前端應用程序,但我不明白如何實現這一點。Angular2和symfony3 FOSOAuthServerBundle授權
我試過「令牌」端點方法,但是我不得不從我的angular2應用程序發送client_id和client_secret。我認爲公開存儲client_secret是不好的。
「授權」端點不使用client_secret,但要求登錄表單,對我的情況有什麼不好。
我試過自定義授權擴展,但是FOSOAuthServerBundle也需要使用client_secret驗證客戶端。
什麼是最好的做法授權與symfony angular2?在前端存儲client_secret可以嗎?還是應該擴展FOSOAuthServerBundle並刪除client_secret檢查?
需要更多信息。代碼片段如果可能的話。 –
如果FOSOAuthServeBundle不符合SPA要求,我希望搜索另一個捆綁軟件,並發現使用Symfony進行SPA驗證的相當不錯的解決方案:https://github.com/lexik/LexikJWTAuthenticationBundle – Emptyhand