cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to redirect user to Organization Form Login page after a logout ?

ssauvage-2
Aquamarine

How to redirect user to Organization Form Login page after a logout ?

I'm posting this because it may help others.

 

When you are using an Organization Login Form page, after logout, you may want the user to be redirected to this.

Form Login URL is like:

http://host:port/Thingworx/FormLogin/MyOrg

where MyOrg is your organization name.

In TWX 8.5, logout function proposes you to redirect to:

  • a Mashup
  • a URL

As Form Login is not a Mashup, you can use the second option (URL). But then, you have to rebuild the URL from composer...

You can do this using an expression that will return:

result = window.location.protocol + "//" + window.location.host + "/Thingworx/FormLogin/MyOrg";

And you bind your expression like this:

2020-03-05_16-41-37.png

assuming here that the button is the logout user action.

4 REPLIES 4

Re: How to redirect user to Organization Form Login page after a logout ?

Hello @ssauvage-2,

 

If you just choose your default mashup in Mashup parameter -- won't it bring you to the form login automatically? Seems to work for us.

 

/ Constantine

Re: How to redirect user to Organization Form Login page after a logout ?

Hello @Constantine .

 

No, because Form Login mashup is generated by TWX and is not a usual mashup (you cannot open it in mashup builder).

 

Sébastien

Re: How to redirect user to Organization Form Login page after a logout ?

When a user logs in, right after the form login he gets redirected to some default mashup (e.g. "DashboardMashup"). What if you configure your logout widget to set this DashboardMashup?

 

/ Constantine

Re: How to redirect user to Organization Form Login page after a logout ?

  1. you don't want the user going to the "dashboard" without passing through authentication page
  2. you get in fact an error as the user is not authenticated then you have the user/password window poping

Sébastien

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.