realm / realm-loginkit

A generic interface for logging in to Realm Mobile Platform apps
Apache License 2.0
74 stars 21 forks source link

Moved saved credentials to an encrypted Realm #33

Closed TimOliver closed 7 years ago

TimOliver commented 7 years ago

Addresses #24 and adds some of the building blocks for #23 (But that's going to require more time due to the needed UI work).

This PR removes saving user login credentials to NSUserDefaults in an unencrypted state in favor of saving the credentials to a specialized Realm file in the app's Library directory. The Realm is encrypted on iOS devices, but is left unencrypted in the iOS Simulator (for debugging purposes).

While it performs the previous functionality at present (ie, the form is prefilled with the last set of credentials), it has been set up so it can internally manage an ordered list of credentials. This can be exposed in a table view UI at a later time.