You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to implement the dotnet-core-b2c-embedded in my own environment [pre-reqs are covered] looping occurs on due to the JavaScript reload. Every sample I have tried does this. I fixed this by changing the reload JS to this:
This prevents the looping, but the base site did not get the token, even though it was clearly reloaded. What the reload should do is force the site to detect that there was an authentication event, and consume the token. I fixed this by changing the script logic to:
This now works, but what is the underlying issue on all of these samples? Did something change in browser behaviors? I tested to verify looping also by publishing the solution to an Azure app instance and used the same custom domain root to ensure the issue wasn't caused by some type domain security issue.
The text was updated successfully, but these errors were encountered:
When I try to implement the dotnet-core-b2c-embedded in my own environment [pre-reqs are covered] looping occurs on due to the JavaScript reload. Every sample I have tried does this. I fixed this by changing the reload JS to this:
<script> var refresh = window.sessionStorage.getItem('refresh'); console.log(refresh); if(document.referrer.startsWith('https://login.arctoso.com/') && (refresh === null)) { window.sessionStorage.setItem('refresh', "1"); window.top.location.reload(); }; </script>This prevents the looping, but the base site did not get the token, even though it was clearly reloaded. What the reload should do is force the site to detect that there was an authentication event, and consume the token. I fixed this by changing the script logic to:
<script> var refresh = window.sessionStorage.getItem('refresh'); console.log(refresh); if(document.referrer.startsWith('https://login.arctoso.com/') && (refresh === null)) { window.sessionStorage.setItem('refresh', "1"); window.top.location = "https://localhost:44316/MicrosoftIdentity/Account/SignIn" }; </script>This now works, but what is the underlying issue on all of these samples? Did something change in browser behaviors? I tested to verify looping also by publishing the solution to an Azure app instance and used the same custom domain root to ensure the issue wasn't caused by some type domain security issue.
The text was updated successfully, but these errors were encountered: