Blazor RemoteAuthenticatorView => OnLogInSucceeded runs multiple times

Viewed 240

I am using <RemoteAuthenticatorView Action="@Action" OnLogInSucceeded="OnLogInSucceeded" /> in the authentication page of a Blazor app and have noticed that it calls "OnLogInSucceeded" multiple times when a user logs in. I would expect it to only run once. I have to grab some data from a db when a user logs in and figured this would be the place to do it. It's not that is gives an error, just retrieving the data 3-4 on each login is inefficient.

Is there a better way/place to make api calls on login?

I'm using Azure B2C..

0 Answers
Related