I have been successful with creating quickblox session and it works when moving from one page to another. But once the web app gets refreshed, the session gets lost and i have to initialize again using authentication key etc.
I tried persisting the token i got when session got created and initializing the quickblox object using this token but it gives an error saying i need to provide authentication key etc. Which according to their documentation should have worked.
I was wondering if there is a more efficient way of managing the session? I don't like having to re-initialize the session everytime the app gets refreshed. Any pointers would be appreciated. I usually persist session detail in local storage using pouch db. The app is an angular js app, using ui-router. I use the stateprovider's run function to initialize the qb object, but I first check if there is an existing session.
LcDb.get session().then(
function(res){
Qb.init(res.token);
},
function(err){
Var config = {
on: {
sessionExpired:function(next,retry){
}
}
QB.init(app.Id,app.key,app.secret,config);
})
QB.create session(function(err,result){