On Tuesday, June 28, 2011, Jonathan <[email protected]> wrote:
> granted you need to but how with iui. I am having the same problem as
> this thread now: 
> http://groups.google.com/group/iphonewebdev/browse_thread/thread/f460db68dd02abea

Login is a pretty much serverside process, frontend doesn't have so
much to say here...


> Surely there is a simpler way to handles this with MVC. I have even
> tried response.redirect to the main page but then it loads the main
> page again insided the current toolbar. Please help.

Which is the actual normal process. A login page with a form, that you
submit via JS or plain POST submission... and detect if login/pass is
ok server side. If not, just render the form again with a clear prompt
message ("wrong pass", "no account with this ident", ...) and if
login/pass is ok, redirect to the "index" of your app. On load, this
"index" should normally test session if ident / token is ok and render
your app (and if not, redirect to login form).

If you deal with session or cookies (or anything in headers), just
forget about ajax form submission ...

R.

-- 

Kinds Regards,
Remi Grumeau

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to