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

expo-auth-session and expo-apple-authentication have incompatible types for identity token stirngs #28907

Open
paulschreiber opened this issue May 16, 2024 · 2 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@paulschreiber
Copy link
Contributor

paulschreiber commented May 16, 2024

Minimal reproducible example

https://gist.github.com/paulschreiber/9d41cee707cf2e2d81e2085fa20368aa

What platform(s) does this occur on?

iOS

Did you reproduce this issue in a development build?

Yes

Summary

expo-auth-session and expo-apple-authentication have incompatible types for identity token strings.

expo-apple-authentication uses

identityToken: string | null;

expo-auth-session uses uses

  idToken?: string;

which is string | undefined.

This means you can't (directly) have a result that works for both auth systems. I worked around this by adding an extra variable.

Environment

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.5
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
      Yarn: 1.22.15 - ~/.yarn/bin/yarn
      npm: 10.7.0 - ~/.nvm/versions/node/v20.10.0/bin/npm
      Watchman: 2024.05.06.00 - /opt/homebrew/bin/watchman
    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: ~50.0.17 => 50.0.17 
      react: 18.2.0 => 18.2.0 
      react-native: ^0.73.6 => 0.73.6 
    Expo Workflow: managed

Expo Doctor Diagnostics

n/a

@paulschreiber paulschreiber added the needs validation Issue needs to be validated label May 16, 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 May 16, 2024
@brentvatne
Copy link
Member

seems reasonable to align them. want to open a pr?

@paulschreiber
Copy link
Contributor Author

@brentvatne which way would you like to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants