We're developing an SPO custom web part, utilizing https://pnp.github.io/pnpjs for authentication and for communicating with SPO.
I've noticed that when the page with our custom web part loads, the user is often (typically after some time of inactivity) redirected to https://acme.sharepoint.com/_forms/spfxsinglesignon.aspx and then back. This causes the page to be loaded again, which is somewhat annoying.
I guess the webpart is redicted to spfxsinglesignon.aspx to fetch some SSO token, but is there a way to get things working without this redirect? It would be a better use experience if the page didn't have to load twice.
By the way, somewhere in the process, every now and then the user ends up on http://eduumb.sharepoint.com/default.aspx instead of the two afore mentionion pages. Haven't gotten around to debugging this yet, as it's really hard to reproduce, but any input on how to debug this will be appreciated.
Update #1: Seems I didn't set up authentication properly, as described on https://pnp.github.io/pnpjs/authentication/client-spfx/#connect-to-graph-as-current-user. Have implemented this now, and will see if the redirect issue goes away.