Realm encryption key

Hi all. We are using Realm DB for secure chat application. We use encrypted key to open and operate our DB. Now we’ve come up with flow, when user forgets his pin code, we want to encrypt our old DB with new key. And because we store user’s pin code in keychain, we can not access it without user knowing it, thus we can’t open our Realm DB. Is there a way to reset encryption key for this flow?

Hi, There is no way to recover the data if you lost access to the encryption key.

So if you want the ability to reset a password without losing the encryption key, you probably need to store the encryption key on your own servers, where you put a password-reset flow in front.


Ok, thanks a lot for your reply

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.