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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

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

ssauvage-2
13-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.

1 ACCEPTED SOLUTION

Accepted Solutions

  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

View solution in original post

4 REPLIES 4

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

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

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

  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

Top Tags