Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread loginmodule
Thu, Jul 12 2018 2:45 AMPermanent Link

Allen Hunt

I've got a project where I have user's who login exactly like the example login module project (using an external EWB module).  I trying to figure out how a restore the state if a user does a refresh.  I want them to be able to remain logged in and have the same form open.  Is there anyone who can give me a hint how to do this?

Thank you so much!

Best Regards,
Allen
Thu, Jul 12 2018 3:47 AMPermanent Link

Uli Becker

Allen,

> I've got a project where I have user's who login exactly like the example login module project (using an external EWB module).  I trying to figure out how a restore the state if a user does a refresh.  I want them to be able to remain logged in and have the same form open.  Is there anyone who can give me a hint how to do this?

You could use Cookies of LocalStorage to store/read everything you want.
After a logout you can delete these settings.

Uli
Fri, Jul 13 2018 12:54 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Allen,

<< I've got a project where I have user's who login exactly like the example login module project (using an external EWB module).  I trying to figure out how a restore the state if a user does a refresh.  I want them to be able to remain logged in and have the same form open.  Is there anyone who can give me a hint how to do this? >>

This type of functionality is a little bit more complicated than you might think, but essentially you need this:

1) Session functionality on the web server that can dish out unique session IDs after the client application authenticates with the web server application (use https for this).  These session IDs are typically sent back to the client as HTTP-only cookies with an expiration.

2) In the client application, a way to handle when the server application rejects a request because the session ID is no longer valid and the client needs to re-authenticate, repeating step 1).

Both of these things are handled transparently with EWB 3, so that will save you quite a bit of time once it is released (and provided that you are using the EWB Web Server).

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Jul 13 2018 2:53 PMPermanent Link

Allen Hunt

Okay.  Thank you Uli & Tim I will try your approach.

Best Regards,
Allen
Image