persistent login
-
Reitano
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 1
-
Thank you received: 0
-
-
7 years 2 months ago #6372
by Reitano
Hi, is it possible with JBackend after athentication have a persistent login?
For example: user log-in with username and password, butI want the user to not log in again when close the App on smartphone and after re-open the App.
How i can make this?
thanks
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
7 years 2 months ago #6375
by admin
Hi,
standard Joomla session is based on cookies, but jBackend adds support for session_id (i.e. you can pass the session id as request param or in the header), as documented here:
www.selfget.com/documentation/jbackend-joomla30/user-module-api.html
So you can use this to reuse a session if it is not expired yet (of course the session lifetime is a Joomla global configuration parameter).
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 12
-
Thank you received: 0
-
-
7 years 1 month ago #6415
by phonemas
Regards,
Is it possible to obtain the session_id at the time of the login?
That would avoid making another call to the server
Thanks in advance for your reply
Solón
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
7 years 1 month ago #6418
by admin
Hi Solón,
sorry but you already have the session_id in the response:
{
"status": "ok",
"userid": "887",
"username": "manager",
"session_id": "v6tgn88v2t9e82i2i1onkfqjpu"
}
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 12
-
Thank you received: 0
-
-
7 years 1 month ago #6419
by phonemas
Hi Luigi,
It is right. I was working with an outdated version of JBackend. I respectfully suggest update the documentation.
Thank you very much,
Solon
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
Time to create page: 0.213 seconds