Sander, Thank you for the response. Returning promise makes more sense. I'll change my method accordingly. However, the reason for data not printed out is that 1. secure storerage crap out earlier when i am running on browser since it only work in mobile device. 2. my form bidning was bad, there was no value passing to secure storage when i set().
About the plain text password, i am aware that it should be hashed and i have no intent to store password in production app. However, is it safe to use secure storerage to keep sensitive data on the device? On Wed, Oct 9, 2019 at 11:34 PM Sander Elias <sanderel...@gmail.com> wrote: > Hi Nhut, > > It's not very usual to wrap promises inside an object, and it's making > handing your data harder. > You can use Promise.all to make your function return a promise that > resolves when all data is in. > > public getCredential() { > return Promise.all([this.secureStore.get('uname'), this.secureStore. > get('pwd')]).then( > ([uname, pwd]) => ({ uname, pwd }) > ); > } > > An observation. You seem to stroe your passwords in plaintext. Which is > fine for a demo app, but a huge security risk anywhere else. > > Regards > Sander > > -- > You received this message because you are subscribed to the Google Groups > "Angular and AngularJS discussion" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to angular+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/angular/5f7be89e-7b37-44a6-960b-7b57e1f5018e%40googlegroups.com > <https://groups.google.com/d/msgid/angular/5f7be89e-7b37-44a6-960b-7b57e1f5018e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Castor Technologies Inc 460 rue St-Catherine St Ouest, Suite 613 Montréal, Québec H3B-1A7 (514) 360-7208 o (514) 798-2044 f n...@castortech.com www.castortech.com CONFIDENTIALITY NOTICE: The information contained in this e-mail is confidential and may be proprietary information intended only for the use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any viewing, dissemination, distribution, disclosure, copy or use of the information contained in this e-mail message is strictly prohibited. If you have received and/or are viewing this e-mail in error, please immediately notify the sender by reply e-mail, and delete it from your system without reading, forwarding, copying or saving in any manner. Thank you. AVIS DE CONFIDENTIALITE: L’information contenue dans ce message est confidentiel, peut être protégé par le secret professionnel et est réservé à l'usage exclusif du destinataire. Toute autre personne est par les présentes avisée qu'il lui est strictement interdit de diffuser, distribuer ou reproduire ce message. Si vous avez reçu cette communication par erreur, veuillez la détruire immédiatement et en aviser l'expéditeur. Merci. -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/CAJVRZt_2sVy1qf_T%2B1SVhvUOXZRvCdR-L0LzwFGeosgwYNgY7w%40mail.gmail.com.