Page 1 of 1

Workaround for expired token when using Apperyio.User.loginFB - error DBEL002 - Angular / Ionic

Posted: Fri May 06, 2016 12:27 pm
by Ricardo Amaral

I have created a logic for auto login on my Ionic app (for regular user account or facebook via Apperyio.User.loginFB).

One possibility is the session token get expired after some time, so the app needs to re-login automatically. The problem is that for FB I was receiving error code DBEL002 description: Invalid session token specified.

After some troubleshooting I realized the app was sending the expired token to try to login again, and for that reason the login was denied. So I need to clean up the token before try to login again. Just include the code below before new logon attempt:

code Apperyio.User.invalidate(); /code

No further assistance is required.


Workaround for expired token when using Apperyio.User.loginFB - error DBEL002 - Angular / Ionic

Posted: Fri May 06, 2016 5:54 pm
by Serhii Kulibaba

Hello Ricardo,

You are able to set any Session expiration time on the database tab: Image

If you need to do the same in the app - you can use cookies for that, or keep last sessionToken update time, and remove that storage variable if this date is expired.


Workaround for expired token when using Apperyio.User.loginFB - error DBEL002 - Angular / Ionic

Posted: Tue Jan 10, 2017 12:40 pm
by Luis

Hi Sergiy, is there a way to get this settings variable value in javascript?


Workaround for expired token when using Apperyio.User.loginFB - error DBEL002 - Angular / Ionic

Posted: Thu Jan 12, 2017 3:49 pm
by Serhii Kulibaba

Hello Luis,

No, it is impossible to change that setting. Because this is a database parameter, which can't be changed with the application.