C
C#6mo ago
adc90

Getting user credentials blazor

I have a blazor application I'm working on as part of a group. Our components are set as ServerPrerendered. I get my token back parse it into credentials and put that in a scoped service and get the info that way. Everything is golden util the circuit is disconnected, I store the token in localStorage, however I can't get it until OnAfterRenderAsync. However that's not how our application is set up. It expects the credentials to be there on OnInitializedAsync. Is there anyway to force a particular component to run first, render and be able to pull information from the Javascript and then put it back into the DI for subsequent components to use. Or would the application have to be reworked so that any credentials are retrieved OnAfterRenderAsync
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server