You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 2, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 2, 2018. It is now read-only.
The default behavior for logging in via Auth is to store "email" and "password" in LocalStorage. Ionic should really go out of their way to avoid using keys that an end user may use in their own application. As it stands, this is really two issues:
a) You document that you persist logins, but you do not how - and that is bad.
b) WHen you do make use of LocalStorage, you should be consistent. I see a key called "ionic_insights_session". But my user details are in "email" and "password". Why not "ionic_email" and "ionic_password"?
You are absolutely right. I forgot I had stored it myself and then removed the code that did it. While I still think it needs documenting (and y'all will so that's good!) I apologize for the misfire here!
I think it depends. With iOS killing off LS randomly, Ionic Storage may be a bit safer.
My #1 issue though is documenting and having a clear "line in the sand" for Ionic junk. That way a developer never accidentally intrudes on your stuff.
Activity
imhoffd commentedon Nov 6, 2016
We are definitely not storing passwords in LocalStorage. Passwords shouldn't be stored anywhere except in their owner's brains.
We do store a JWT token in LocalStorage after authenticating the user, as seen here. We store the token in a namespaced key with the app ID.
These are the keys I see in my app:
As for documenting how auth works, I totally agree! I've added a task in our issue tracker to document more how our auth system actually works.
cfjedimaster commentedon Nov 6, 2016
You are absolutely right. I forgot I had stored it myself and then removed the code that did it. While I still think it needs documenting (and y'all will so that's good!) I apologize for the misfire here!
imhoffd commentedon Nov 10, 2016
@cfjedimaster Speaking of LocalStorage for auth, do you see any issues with continuing to use LocalStorage (as opposed to https://github.com/driftyco/ionic-storage)? Just curious on your thoughts.
cfjedimaster commentedon Nov 10, 2016
I think it depends. With iOS killing off LS randomly, Ionic Storage may be a bit safer.
My #1 issue though is documenting and having a clear "line in the sand" for Ionic junk. That way a developer never accidentally intrudes on your stuff.