× Requests and support related to jBackend.

persistent login

  • Reitano
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 7 months ago #6372 by Reitano
persistent login was created 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.

More
6 years 7 months ago #6375 by admin
Replied by admin on topic persistent login
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.

More
6 years 6 months ago #6415 by phonemas
Replied by phonemas on topic persistent login
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.

More
6 years 6 months ago #6418 by admin
Replied by admin on topic persistent login
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.

More
6 years 6 months ago #6419 by phonemas
Replied by phonemas on topic persistent login
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.

More
6 years 6 months ago #6420 by admin
Replied by admin on topic persistent login
I forget about it. Done, thanks.

Please Log in or Create an account to join the conversation.

Time to create page: 0.150 seconds