FR: URL opens (already logged in) page and runs a process

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
RLJB
Posts: 880
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

FR: URL opens (already logged in) page and runs a process

Post by RLJB »

Use case:

- A user is already logged into our system

- Our system sends the user a notification email, for example it is "This Task is now due"

- the email has it has a button/link to "view the task now"

- the user clicks button and the browser is focussed on Aware app and runs a process to find Task and display it

- if the user is NOT logged in it will display the login page, and when they do login it will run the process to display the Task instance

What we need:

- a URL that when clicked will open browser, then look for an active Aware tab, and if there is one run a process (like startProcess2 where we have an ID as a parameter in the URL)

- if not it goes to the login page but still stores the process name and param so it can be run as soon as they login

Why is this useful?

- a lot of business applications send notifications either by email or SMS or into Slack/Chat apps etc

- users "expect" a simple one click process to take them to the app and the instance that they are being notified about

- there's lots of use cases for this beyond just notification emails

I understand Aware uses Session cookies not login cookies. I don't pretend to understand how that works or if the above is possible but in my mind Support can do "anything". I do know that Users ask for this a LOT, and complain that directing them to the login page isn't really good enough in 2019.
Rod. Aware 8.3 (latest build), Developer Edition, on OS Linux (Ubuntu 18) using GUI hosted on AWS EC2, MYSQL on AWS RDS
rob_h7
Posts: 84
Joined: Mon Jan 25, 2010 3:52 am

Re: FR: URL opens (already logged in) page and runs a proce

Post by rob_h7 »

YEP +1

a url with firstcommand & startprocess2 allows you to pass a BO and an id so you can easily get an object in context - but to have it look for an active session in your tabs & then run the first command, rather than open a new tab with a new session and ruin your other session - that would be the business.
Rob . Aware 8.4 (build 2718), Developer Edition, using Linux, MYSQL
PointsWell
Posts: 1125
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: FR: URL opens (already logged in) page and runs a proce

Post by PointsWell »

So if the app is already open are you expecting the link to just open a tab or return to the original tab.

Hope that question doesn't kill the thread.
rob_h7
Posts: 84
Joined: Mon Jan 25, 2010 3:52 am

Re: FR: URL opens (already logged in) page and runs a proce

Post by rob_h7 »

From what I gather from the original request:

System sends an email to the user > Task due today.
Email contains a link 'View Now' with firstcommand, startprocess2 to find the object and display it, object identifier, object ID
Click the link - it checks first to see if there's already an active session in the browser.

If there is an active session- it runs the firstcommand, finds the object, displays it for the user (whether this is a new aware tab, popup window, modeless - im not sure how it'll handle that - maybe a new parameter we can pass in the url.

if there isn't an active session it takes them to the login page to login, when they login it then resumes and runs the firstcommand, finds the object, displays it for the user
Rob . Aware 8.4 (build 2718), Developer Edition, using Linux, MYSQL
Jaymer
Posts: 1996
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: FR: URL opens (already logged in) page and runs a proce

Post by Jaymer »

I don’t think this is ever going to happen.
Most of this in the original post, you can already do.
But the issue of finding a browser tab and switching to it I doubt it’s gonna happen.
Because I researched this already, I doubt vlad can help – as soon as the tomcat server gets a new connection from someone’s machine, it creates a new session ID. If there was already A session in that browser, it invalidates the old session ID.
You’re never going to get into aware and connect to a previous session.

And you don’t need to take them to a login screen, because you can build a login into the link. So they get the email, it has a link, it logs them into their real account, and can do anything you want because u can pass parameters in or flags and tell it to go somewhere with if statements.
Click Here to see a collection of my tips & hacks on this forum? Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
RLJB
Posts: 880
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Re: FR: URL opens (already logged in) page and runs a proce

Post by RLJB »

And you don’t need to take them to a login screen, because you can build a login into the link. So they get the email, it has a link, it logs them into their real account, and can do anything you want because u can pass parameters in or flags and tell it to go somewhere with if statements.
No, unfortunately that doesn't work...

1. you can't build a login link as you don't know the user's password, it is encrypted in the DB and can't be used in the URL with the parameter &password=

2. if you take the insecure approach (which we will never do) (whereby you store a copy of their password in a non encrypted attribute and use it for the login button) and they are already logged in to the system then by logging them in again (in a seperate tab) you invalidate the already logged in tab (session timeout), if the user has multiple tabs open in your aware app they will be very annoyed.
Rod. Aware 8.3 (latest build), Developer Edition, on OS Linux (Ubuntu 18) using GUI hosted on AWS EC2, MYSQL on AWS RDS
Jaymer
Posts: 1996
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: FR: URL opens (already logged in) page and runs a proce

Post by Jaymer »

Rod,
did you ever get this to work?
I found a solution.

When I wrote "I don’t think this is ever going to happen.", if Vlad read that, I think he had to be smiling. Because it is possible.
I mentioned this in my "Monday Shocker" thread - which NO ONE replied to - so I wasn't going to post the solution if no one was interested.
I figured someone would say "wow, thats cool - but you didn't say how to do it"
I'll discuss this confidentially with you if you're interested.
Contact me directly on Skype: JaymerJaymer
Click Here to see a collection of my tips & hacks on this forum? Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
aware_support
Posts: 7299
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: FR: URL opens (already logged in) page and runs a proce

Post by aware_support »

I have never seen this thread before. Has it been resolved by Jaymer somehow?
Aware IM Support Team
rob_h7
Posts: 84
Joined: Mon Jan 25, 2010 3:52 am

Re: FR: URL opens (already logged in) page and runs a proce

Post by rob_h7 »

We haven't looked into it since the original posts - Jaymer, did you crack it?
Rob . Aware 8.4 (build 2718), Developer Edition, using Linux, MYSQL
RLJB
Posts: 880
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Re: FR: URL opens (already logged in) page and runs a proce

Post by RLJB »

Still an absolute cracking feature request, we would love to have this.
Rod. Aware 8.3 (latest build), Developer Edition, on OS Linux (Ubuntu 18) using GUI hosted on AWS EC2, MYSQL on AWS RDS
RLJB
Posts: 880
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Re: FR: URL opens (already logged in) page and runs a proce

Post by RLJB »

Hi Jaymer

You mentioned you found a solution to this, could you give us a high level (bullet point) idea of how to implement this?

We have come across another use case where this would be very helpful:

- we have a Document storage module, pretty basic, a user uploads a Doc for other users to access

- they would like to create a link to the document so they can send it to another user, or put it on their intranet

- the link would log them into Aware, run a first process to find the Doc and present it on the screen to download

- as above, we don't want to have to include the password in the link and we don't want to invalidate any open session they may have in a browser

Any hints would be greatly appreciated.
Rod. Aware 8.3 (latest build), Developer Edition, on OS Linux (Ubuntu 18) using GUI hosted on AWS EC2, MYSQL on AWS RDS
Jaymer
Posts: 1996
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

URL opens (already logged in) page and runs a process

Post by Jaymer »

(sorry for the delay, didn't see my mention in those posts just above)

Sure, the solution goes back to 2011 from this post:

I had this working (not necc. in Production cause I don't have a need) but it doesn't seem to work now - but I think its due to the Tomcat setup and funky way some redirection is happening - recently changed on this server. But it worked fine a month ago.

And yes, as expected, if you had 1 Tab working in Aware, you could open a new tab & paste in a line with "&dynamic=true" and you'd get logged in again with no issues - and the 'firstcommand' would work to start a specific process.

good luck
jaymer...
Click Here to see a collection of my tips & hacks on this forum? Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
RLJB
Posts: 880
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Re: FR: URL opens (already logged in) page and runs a proce

Post by RLJB »

Jaymer thanks for the tip.

This totally works, and is a fantastic feature. There's a lot of great use cases for this.

I've been working in Aware for 10 years, thought I knew "a lot"... makes me wonder about all the other little things I don't know.
Rod. Aware 8.3 (latest build), Developer Edition, on OS Linux (Ubuntu 18) using GUI hosted on AWS EC2, MYSQL on AWS RDS
Post Reply