Force login when starting preview

While testing the access rights I want to force a login every time I start the Preview of my app. Is that possible? And is there a way to initiate a switch of users during a session? Or more general, is it possible to switch users, even if that means that the session is lost and a new on is being created (totally fine by me)?

I have not tried this, either, but is it possible for an unverified user to use a bookmarked url to bypass authentication to get to a random page?

Hi gentlemen,
The only way to force a login is to clear your browser’s cache.
Yes it is useful when you cant to test permissions.
I suggest you to open an incognito window when you want to test specific permissions: you then can login with the user you want.

We already identified this topic, and logout or switch user/profile (or impersonate) is something we plan in the future.

@mikey an unverified user cannot bypass authentication to get a random page. The endpoint will always propose the login form if the user is not logged in.


shall i assume that any other state management control is on us, then? if an authenticated user has a bookmarked page, it’s up to us to decide what to do, if there is a prescribed flow?

Thank you for clarifying. Looking forward to the future! :slight_smile: