Hi Oussama, this happens because, in the built mobile app, the login/logout actions cause the app to reload or close, unlike in the web or Make it Native preview.
Why it happens:The native build handles session changes differently and may treat some JavaScript actions (like page reloads or window close commands) as app exits.
How to fix:
Avoid full app reloads or commands that close the app after login/logout.
Use navigation methods to redirect users without closing the app.
Ensure authentication updates finish before navigating.
Check your JS actions for any code that might close the app unintentionally.
Test with device logs to catch errors causing the app to close.
Basically, adjust your flow to prevent the app from closing after login/logout in the native build.
I hope this one helps you! :)