Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazor Sever App Writing Json Token LocalStorage

$
0
0

I have a Blazor Server App that authenticates users via an Identity Provider (SAML 2.0). Once authenticated, the Identity Provider redirects to my Assertion Consumer Service which is an API end point. But the client gets disconnected during the sign in process to the Identity Provider. Once I consume the SAML assertion I want to add claims to a JWT Token and save it to the local storage. But the API controller is in a state of "PreRendering" and the JavaScript interop is unavailable at this time. I'm unable to persist any data from the claims to a blazor page. I've tried using a scoped service class, but it doesn't hold the state between the API controller and the redirect to a blazor page. How can I can persist some "Model" from an API Controller to a Blazor Page? I can then use the Model to populate claims and save the JWT Token on the blazor page AfterRederAsync().


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>