authentication - Current user doesn't persist when reloading an app (Ionic2 + Parse Server) -
i'm working on ionic 2 app parse server backend.
i implemented signed process. no problems here, works expected: new account created, user logged in after sign , current user exists.
now want use current user , bypass sign up/login page next time user opens app (if user logged in ). parse documentation states:
“it bothersome if user had log in every time open app. can avoid using cached current parse.user object. whenever use signup or login methods, user cached in localstorage.”
in case, however, can't manage make work. create current user according parse documentation during initialization process of app:
var currentuser = parse.user.current(); if (currentuser) { // stuff user } else { // show signup or login page }
every time open app after successful sign current user null.
any ideas?
i kinda understand what's going on, still don't understand why.
during signup or login parse supposed save current user local storage, if local storage not available reason, saves memory map. , happens in case: parse saves current user memory map, is, of cause, temporary storage. hence, every time reload app, parse memory map empty. don't understand why in environment parse decides local storage unavailable. couldn't find in code decision made. seems me memory map default (which not true). local storage functionality not implemented yet in open source version of parse? or have ionic2 implementation?
is there out there parse team familiar part of parse code?
thanks.
Comments
Post a Comment