Fizzix
Fizzix

Reputation: 24375

How to save and load multiple credentials using Locksmith?

I'm using a basic library called Locksmith. Although, it seems as if all the examples handle a single username and password for the application, instead of multiple.

Example:

let dictionary = Locksmith.loadDataForUserAccount("myUserAccount")

The above just returns a username and password for that particular account. How would I use Locksmith to save and load many user accounts?

Upvotes: 0

Views: 304

Answers (1)

MarioKurt
MarioKurt

Reputation: 300

For multiple user accounts on the same device, I'll store and load data using a key that includes something unique about each user. Instead of "myUserAccount", I'll save and load data with a key like "myUserAccount-userId123" or "myUserAccount-JimSmith".

Upvotes: 1

Related Questions