pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

how to know that user is logged in the application

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??

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to know that user is logged in the application

Hi Pritu,

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

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

how to know that user is logged in the application

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to know that user is logged in the application

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?

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

how to know that user is logged in the application

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to know that user is logged in the application

Pritu,

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

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

how to know that user is logged in the application

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to know that user is logged in the application

Thanks, we'll test it.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to know that user is logged in the application

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.

Return to “Issues”