# Unlock Mobile app Using biometrics

**URL:** <https://devforum.okta.com/t/unlock-mobile-app-using-biometrics/21230>\
**Category:** OAuth/OIDC\
**Created:** [July 12, 2022, 8:18pm UTC](https://devforum.okta.com/t/unlock-mobile-app-using-biometrics/21230 "2022-07-12T20:18:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul91](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Rahul91](https://devforum.okta.com/u/Rahul91)\
**Post date:** [July 12, 2022, 8:18pm UTC](https://devforum.okta.com/t/unlock-mobile-app-using-biometrics/21230/1 "2022-07-12T20:18:02Z")

</div>

> **[Unlock a mobile app with biometrics | Okta Developer](https://developer.okta.com/docs/guides/unlock-mobile-app-with-biometrics/ios/main/)**
>
> Secure, scalable, and highly available authentication and user management for any app.

This Document describes on how to unlock mobile app using Okta Classic Engine but I dont find the document for this topic on Okta Identity Engine.Can someone let us know the on how to unlock the mobile app using the OIE usage.

---

<div class="post-metadata">

**Author:** ![erik](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@erik](https://devforum.okta.com/u/erik)\
**Post date:** [July 15, 2022, 10:59pm UTC](https://devforum.okta.com/t/unlock-mobile-app-using-biometrics/21230/2 "2022-07-15T22:59:09Z")

</div>

Hello,  
Assuming you are using the latest version of the IDX sdk

> **[Release 3.0.0 · okta/okta-idx-swift](https://github.com/okta/okta-idx-swift/releases/tag/3.0.0)**
>
> What's Changed
> 
> Add installation instructions for CocoaPods to the README by @mikenachbaur-okta in #100
> Adapt to build upon AuthFoundation from https://github.com/okta/okta-mobile-swift by @mikenac...

Have you checked if the following would meet your needs:  
[https://okta.github.io/okta-mobile-swift/development/authfoundation/documentation/authfoundation/credential](https://okta.github.io/okta-mobile-swift/development/authfoundation/documentation/authfoundation/credential)  
[https://okta.github.io/okta-mobile-swift/development/authfoundation/documentation/authfoundation/credential/security/](https://okta.github.io/okta-mobile-swift/development/authfoundation/documentation/authfoundation/credential/security/)

So when storing credentials you can do something like:

```auto
try Credential.store(token,
                     tags: ["displayName": "My User"],
                     security: [
                         .accessibility(.afterFirstUnlock),
                         .accessControl(.biometryAny),
                         .accessGroup("com.example.myApp.shared")
                     ])

```

If more advanced cases are needed custom [TokenStorage](https://okta.github.io/okta-mobile-swift/development/authfoundation/documentation/authfoundation/tokenstorage) and [CredentialDataSources](https://okta.github.io/okta-mobile-swift/development/authfoundation/documentation/authfoundation/credentialdatasourcedelegate) can be implemented.

---

<div class="post-metadata">

**Author:** ![kyle-beard-wex](https://avatars.discourse-cdn.com/v4/letter/k/7c8e57/32.png) [@kyle-beard-wex](https://devforum.okta.com/u/kyle-beard-wex)\
**Post date:** [May 3, 2023, 6:50pm UTC](https://devforum.okta.com/t/unlock-mobile-app-using-biometrics/21230/3 "2023-05-03T18:50:09Z")

</div>

@erik I followed these exact steps and got the error `cannotSave(code: -50)` when setting up like specified. What types of issues would cause an error like this? I had previously revoked and removed my Credential’s default token. I also had biometrics setup in the app prior for the info.plist contains permissions to prompt the user for privacy sake.

---

<div class="post-metadata">

**Author:** ![jojojo](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jojojo](https://devforum.okta.com/u/jojojo)\
**Post date:** [August 10, 2023, 7:26am UTC](https://devforum.okta.com/t/unlock-mobile-app-using-biometrics/21230/4 "2023-08-10T07:26:23Z")

</div>

We are facing the same issue, have you found out the cause?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 13, 2024, 4:44pm UTC](https://devforum.okta.com/t/unlock-mobile-app-using-biometrics/21230/5 "2024-02-13T16:44:15Z")

</div>

Closed on February 13, 2024, 4:44pm UTC


