Blazor WASM App 驗證與授權

先給結論

跟 Blazer Server App 一樣都是用 AuthenticationStateProvider為中心來實作。

存放登入Token的地方為瀏覽器的 windows.localStorage。(沒有更好的地方嗎?)

記得登入狀態改變時,不管登入或登出都要用 NotifyAuthenticationStateChanged 函式向外通知。

這篇文章有登入流程圖

Authentication and authorization

Part 1

Part 2

Last updated