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

When using biometrics in react-native, iOS Face ID prompts comes only at the second time #29637

Closed
THPubs opened this issue Jun 11, 2024 · 3 comments · Fixed by #29981
Closed

Comments

@THPubs
Copy link

THPubs commented Jun 11, 2024

Minimal reproducible example

https://github.com/THPubs/expo-secure-store-biometrics

What platform(s) does this occur on?

iOS

Did you reproduce this issue in a development build?

Yes

Summary

I use expo SecureStore to store the session token in my react-native app like this:

await SecureStore.setItemAsync(
  'session',
  JSON.stringify({
    ...JSON.parse(session),
    refreshToken,
  }),
  {
    requireAuthentication: true,
  },
);

This should bring the FaceID prompt in iOS. But it does not. If I call this twice, then it shows the FaceID prompt. Also when I delete the value and try to re-add it, the Face ID prompt will not being shown unless I press the button twice (I was referring to the minimal reproducible example.)

Environment

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.5
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 20.12.2 - ~/.local/state/fnm_multishells/63778_1718091622562/bin/node
      Yarn: 1.22.22 - ~/.local/state/fnm_multishells/63778_1718091622562/bin/yarn
      npm: 10.5.0 - ~/.local/state/fnm_multishells/63778_1718091622562/bin/npm
      Watchman: 2024.05.06.00 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.15.2 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
    IDEs:
      Xcode: 15.4/15F31d - /usr/bin/xcodebuild
    npmPackages:
      expo: ~51.0.12 => 51.0.12
      expo-router: ~3.5.16 => 3.5.16
      react: 18.2.0 => 18.2.0
      react-dom: 18.2.0 => 18.2.0
      react-native: 0.74.2 => 0.74.2
      react-native-web: ~0.19.10 => 0.19.12
    npmGlobalPackages:
      eas-cli: 9.1.0
    Expo Workflow: managed

Expo Doctor Diagnostics

✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for issues with metro config
✖ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check native tooling versions
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Detailed check results:

This project has native project folders but also has config plugins, indicating it is configured to use Prebuild. EAS Build will not sync your native configuration if the ios or android folders are present. Add these folders to your .gitignore file if you intend to use prebuild (aka "managed" workflow).
@THPubs THPubs added the needs validation Issue needs to be validated label Jun 11, 2024
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels Jun 11, 2024
@expo-bot
Copy link
Collaborator

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

@github-actions github-actions bot removed the needs review Issue is ready to be reviewed by a maintainer label Jun 14, 2024
@vonovak
Copy link
Contributor

vonovak commented Jun 25, 2024

Hello @THPubs and thanks for reporting,
I have opened #29981 that explains the behavior better in our docs. The bottom line is that what you're seeing is expected. Can you take a look at the PR and confirm if it clarifies the behavior for you?
Thank you 🙂

@THPubs
Copy link
Author

THPubs commented Jul 2, 2024

Awesome thanks @vonovak ! This clears things up 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants