Android signIn failing (Keys are invalid) error

Using https://github.com/okta/okta-oidc-android okta lib to implement okta authentication on our android app. Recently sign in has started failing on few devices with “Keys are invalid” error. It seems the error is being thrown from DefaultEncryptionManager class of okta.

Any idea why it is happening and how to fix it ?

Exact error is “Keys are invalid. Failed to obtain information about private key”

Clear sessionClient resolved the issue

Hi,

This happens when you reinstall or update the application. If it have lingering encrypted data from before. It can’t decrypt since it no longer have the valid keys. The best way to handle this is to catch the exception and clear data.

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