Well, I think it's more complicated, I listen to 'location-changed'
event, and fire it also, can't understand 'why' now.
I've also just tried firing other event from login/logout, it seem to
work too.
Regarding the authenticity, in my case, server has it's own
authentication session (tracked within cookie), I'm just trying to
keep in sync client state using 'store'. When it's really important
that server session is valid, I call account:connected with callback,
when it's not critical, it just check the 'store.
Frankly speaking it's not working very well. For some reason store is
cleared on second attempt within logout, may be I get more than one
'app' instances.
If you want to play with it, but it does not use this 'welcome' text
anymore, see
http://yogastudio.cz/eshop/index.php/checkout/shipment,
it's in Russian, but you may figure out what to do :), login/password
is
te...@example.com/password, then to logout type
http://yogastudio.cz/eshop/index.php/account/account in address bar,
and check first page again, it should prompt to login but it does not,
while doing logout again helps this time. Weird :-/
Thank you.
On May 15, 11:58 am, Tom Streller <
lambdad...@googlemail.com> wrote:
> Like me, you figured it out with listening to the "run" event ;)
>
> I just have a question: How do you ensure the authenticy of the user? How
> can the server be sure that the user doing the next request is the ine who
> just logged in?
>
> 2012/5/15 Andriy Zhdanov <
azhda...@gmail.com>
>
>
>
>
>
>
>
> > Hi Tom,
>
> > It's me again :) I seem have been doing the same feature, I don't
> > remember if triggering did not work for me too, but I ended with
> > session store instead, and update it in login/logout. Well, this is
> > not perfect also. But you may check this approach:
>
> >
http://code.google.com/p/yogamamadvd/source/browse/trunk/catalog/view...