0

What would be the recommandations for designing a login screen in GWT?

I know that GWT is completely Async but the login process is fairly binary, you're either logged in now or never, but not something like perhaps later...

  • Is there a way to make the client side wait?
  • Should I have some kind of client side call back?

Any idea is appreciated...

jgp
  • 2,069
  • 1
  • 21
  • 40
  • Could you not replace the page with a "please wait" spinner once the process starts? – Boris the Spider Mar 27 '14 at 08:18
  • I could, but how do I make the client wait? – jgp Mar 27 '14 at 08:19
  • What do you mean? They have a please wait message, if they choose not no then there's nothing you can do. How does Google make people wait for their search results to return? – Boris the Spider Mar 27 '14 at 08:21
  • 2
    You already mentioned it. Use a callback. GWT communication between client and server is always programming with callbacks. You show a please wait message box, do a server request with the login credentials and install a callback for the login request. Then do nothing. The callback handler then checks, if the login was successfull and then shows the main panel. – vanje Mar 27 '14 at 08:25
  • TBH, the best architecture is to not do it within your app. _Protect_ your HTML host page, so when it's loaded you know the user is already logged in. Does not work in all cases though (but most cases). – Thomas Broyer Mar 27 '14 at 09:52
  • We use RequestFactory and have put a "sniffer" in to detect auth failure (not logged in yet or timeout)... then we put up the login prompt (SSO/CAS) and retry the request when we think all is working. Shared, but not tidy, code here: https://github.com/salk31/gwt-rf-queue – salk31 Mar 28 '14 at 13:16

1 Answers1

0

I don't understand the question re. client side wait.

Well, if it is a general login architecture question as in title then below are some references I found helpful:

SO GWT cookies & redirection

SO GWT XSRF

GWT XSRF

GWT Login Page tutorial within Eclipse GWT Designer

Community
  • 1
  • 1
Patrick
  • 1,561
  • 2
  • 11
  • 22