How to direct the user to the sign in page with the selected language after sign out

0
Hello Team, I am working on a POC where the user have ability to select the display language of the application.When the user logs out i need to direct the user to sign in page with the language he has selected before sign out. Example: User Signs in with default English sign in page >He selected Japanese as preferred language and did some actions and logs out . then, the user should redirected to sign in page which has translated to Japanese language. My question and confusion is will this possible in mendix, after the user signs out from app. Because on the sign in page every user is anonymous user and can not have any active sessions after sign out. Please can any one hepls  me to clear my confusion whether this is possible or not in mendix.
asked
1 answers
0

Hi Asha,

This is possible by logging out the user using a Java action and a custom login page.

  1. First, create a Java action that logs out the current user session.

  2. Call this Java action in a microflow and connect it to the logout button of your application. In this microflow, before logging out the user with the Java action, retrieves the user's preferred language.

  3. Based on the language, you can display the respective login page.

Note: The above logic will work when a user tries to log in immediately after signing out. 

To allow users to sign in later based on their preferred language, you can modify your login page slightly.

For example, you could create a sign-in page that asks users to enter their email address. When the user types in their email, you can retrieve the associated account and access their preferred language. Then, you can reload the login page to display it in the user's preferred language.

answered