@Ivan b It seems that you have already disabled the cache for Azure Front Door and have set up the endpoints for login and logout in your staticwebapp.config.json file, which is what I would have started.
Regarding the issue with logout, you may want to check if the logout endpoint is being called correctly. When your web app redirects the user to the logout endpoint, this endpoint clears the user's session from the browser. If your app didn't go to the logout endpoint, the user will reauthenticate to your app without entering their credentials again. The reason is that they'll have a valid single sign-in session with the Microsoft identity platform.
To check if the logout endpoint is being called correctly, you can use the developer tools in your browser.
- Open the developer tools in your browser.
- Go to the "Network" tab.
- Log out of your app.
- Look for a request to the logout endpoint in the network traffic. The URL should be something like
/.auth/logout
.
- Check the response to see if it was successful. The response should be a redirect to the post_logout_redirect_uri that you specified in your staticwebapp.config.json file.
If you don't see a request to the logout endpoint, it's possible that the logout button in your app is not configured correctly. You may want to double-check the configuration in your staticwebapp.config.json file to make sure that the redirect URL is correct.
Regarding the issue with Safari browser on macOS (I understand this less and might need you to provide more details), you may want to check if the browser is blocking cookies. Cookies are used to maintain the user's session, so if they are blocked, the user will not be able to log in or stay logged in.