javascript - Firebase returns "permission_denied" after a while? -


i have developed bot "hearbeat" towards firebase. mean: every 10 seconds bot updates entry in firebase current time, letting website know last time bot online.

code

function heartbeat() {     var time = math.floor(date.now() / 1000);     fb.child("bot").set({         heartbeat: time     }); } 

ps: don't mind being divided 1000, there's other reasons ;)

the issue, however, after while doing (about couple of hours), bot losses (?) it's permissions? , gets error:

"firebase warning: set @ <path> failed: permission_denied". 

when restart bot, works again?

is there kind of limitations i'm missing? i'm using "free plan" @ moment, , thought maybe reason, can't see why of limitations of plan should effect script?

thanks!

as andrè commented issue woth session length located in "login & auth"-tab.

as said, there's no way extend session length without expanding every users session (yes, there users logging in site, , don't want them logged in longer).

therefor: simple solution problem change bot restart @ specific time when there little none users on site :)


Comments