Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want to disable biometric without logout user. #344

Open
rajeshjadidminc opened this issue Nov 25, 2022 · 5 comments
Open

Want to disable biometric without logout user. #344

rajeshjadidminc opened this issue Nov 25, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@rajeshjadidminc
Copy link

rajeshjadidminc commented Nov 25, 2022

Describe the feature request.

I have implemented this demo and it's working fine with enabling the biometric.

I want the user to disable biometrics once it's enabled by the user.
In the current implementation when I disable biometrics it will force me to log out.
biometrics

New or Affected Resource(s)

I want to enable/disable features inside the app without logging out users from the app.

Provide a documentation link

No response

Additional Information?

This function forces me, log out user, due to change the defaultEncryptionManager.

currentEncryptionManager?.removeKeys()
sessionClient.clear()
currentEncryptionManager = defaultEncryptionManager
try { //set the encryption manager back to default.
sessionClient.migrateTo(currentEncryptionManager)
} catch (e: AuthorizationException) { //NO-OP
}
showSignedOutMode()

Please give me suggestion asap so i can plan to purchase okta .

@rajeshjadidminc rajeshjadidminc added the enhancement New feature or request label Nov 25, 2022
@emanor-okta
Copy link

Hello @rajeshjadidminc,

Have you tried using migrateTo(EncryptionManager)

Note there is a new Android SDK that all new projects should start with and existing projects should begin to migrate to,
okta-mobile-kotlin

I believe at this point okta-oidc-android is mostly in a security only patch state.
So any new/modification feature would need to be forked and done on an individual basis.

New Mobile SDK announcment,
https://developer.okta.com/blog/2022/08/30/introducing-the-new-okta-mobile-sdks

@rajeshjadidminc
Copy link
Author

rajeshjadidminc commented Nov 28, 2022 via email

@rajdeepnanua-okta
Copy link
Contributor

Hi @rajeshjadidminc, we currently don't have a sample for enabling biometrics in okta-mobile-kotlin. Adding that is my top priority currently, and I will notify you once I have a working sample.

@rajdeepnanua-okta
Copy link
Contributor

rajdeepnanua-okta commented Dec 13, 2022

@rajeshjadidminc, I have a commit up for how to do this using okta-mobile-kotlin here: okta/samples-android@420000d. The linked commit makes changes to our browser_sign_in sample to show how to switch between biometric and non-biometric encryption. CredentialTokenStorage.kt in the linked commit helps switch between different SharedPreferences, and BiometricCredentialsManager calls CredentialTokenStorage to switch between SharedPreferences with different encryption. Please let me know if this helps with your implementation.

@rajeshjadidminc
Copy link
Author

rajeshjadidminc commented Dec 14, 2022

Thanks for the update, I have verified the branch and working fine.

Just quick question regarding the session timeout.

Normal banking domain applications are managing sessions with custom API to check whether the session running or not, but in our case, we are using a redirection approach.
So we have 2 cases here:

  • How we can manage the session timeout when the user stays ideal on the same screen for a long time?
  • How we can manage the session when the user goes into the background and come back to the foreground after some time?

Is there a predefined method to check this scenario?

Please provide your valuable input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants