Page 1 of 1

how to know that user is logged in the application

Posted: Thu Feb 20, 2014 10:30 am
by pritu patel

I want to check on login page that user is login in application
for example....
In cakephp there is a Auth function to check login
In appery how to cjeck it??


how to know that user is logged in the application

Posted: Thu Feb 20, 2014 1:12 pm
by Kateryna Grynko

Hi Pritu,

When log in, save sessionTiken and user id in localStorage, then you can read them wherever you need.


how to know that user is logged in the application

Posted: Fri Feb 21, 2014 6:12 am
by pritu patel

How can i get Seesion Token and Id.
My service have no json response.it return html content.
It is possible without json response??
I never worked on token so i have no more idea.plz give some suggestion


how to know that user is logged in the application

Posted: Fri Feb 21, 2014 10:10 am
by Kateryna Grynko

Hi Pritu,

How do your users log in to your app? Do you have a form for input login/password? Where do you store the data?


how to know that user is logged in the application

Posted: Fri Feb 21, 2014 10:31 am
by pritu patel

yes I have form for login.
In login form there is a only username and password field.
I want to store and check from local storage.


how to know that user is logged in the application

Posted: Fri Feb 21, 2014 12:14 pm
by Kateryna Grynko

Pritu,

After you send the data to Appery.io server, is anything returned that means a user is logged in?


how to know that user is logged in the application

Posted: Fri Feb 21, 2014 1:19 pm
by pritu patel

I can't understand what you are asking.
I have no idea about login creation and session.
I share my app on a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a.


how to know that user is logged in the application

Posted: Fri Feb 21, 2014 1:50 pm
by Kateryna Grynko

Thanks, we'll test it.


how to know that user is logged in the application

Posted: Fri Feb 21, 2014 3:22 pm
by Kateryna Grynko

Hi Pritu,

I see no service invoked on login button click...

You should do the following. After a user enters credentials, you send this data to server. If the user is logged in the server returns, for example, the following JSON response:pre{"response":"logged"}/preand you save this value in a localStorage variable.