I need to maintain my log-in credential for throughout the app so, I have 3 options to maintain my log-in credentials...
1 key chain
2 NSUserDefaults
3 plist
Which one is best one to choose ? Is there any other way is there to store the log-in credentials?
Thanks in advance
iCloud Keychain keeps your passwords, passkeys, and other secure information updated across your iPhone, iPad, iPod touch, or Mac. Set up iCloud Keychain.
There are two main types of authentication stores being used with IdPs today: databases and directory stores. In general, with databases, credentials are stored in proprietary tables created by the user management application.
An application must receive credentials from somewhere to use services it depends on. These credentials are usually stored in configuration files.
I'll suggest keychain for storing the login credentials due to the security feature it provides. The keychain services on iOS provide a means to securely store content such as passwords, keys, certificates, etc.
Sensitive data like passwords and keys should be stored in the Keychain. Apple's Keychain Services Programming Guide states that
"A keychain is an encrypted container that holds passwords for multiple applications and secure services. Keychains are secure storage containers, which means that when the keychain is locked, no one can access its protected contents".
Here is two nice tutorial for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With