Skip to content

auth should not depend on image_picker & file_picker #3336

Closed

Description

@vanlooverenkoen

Describe the bug

When you are not using profile pictures in the app. But you are depending on serverpod_auth_shared_flutter it always pulls in the image_picker & file_picker packages.

When uploading the app to the playstore you get this error

ITMS-90683: Missing purpose string in Info.plist - Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “MyApp.app” bundle should contain a NSPhotoLibraryUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you’re using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources.

Stating I need to add NSPhotoLibraryUsageDescription to my Info.plist. The strange thing is, I don't use any photo library code or need to use it. So it does not make sense that I need to add it.

But you are required to add it if you want to deploy your app when you depend on severpod_auth_shared_flutter for authentication.

We should move everything related to profile pictures out of the serverpod_auth_shared_flutter and into it's own package

To reproduce

Just depend on serverpod_auth_shared_flutter and try to submit an app to the appstore without the

NSPhotoLibraryUsageDescription string in your Info.plist

Expected behavior

We should be able to upload to the AppStore without adding NSPhotoLibraryUsageDescription if you are not using it.

Library version

2.4.0

Platform information

iOS

Additional context

No response

How experienced are you with this library?

Expert - Experienced and comfortable with using this library in complex projects

Are you interested in working on a PR for this?

  • I want to work on this

Activity

  1. added
    bug
    on Mar 21, 2025
  2. added
    area: authentication
    enhancement
    and removed
    bug
    on Mar 24, 2025
  3. SandPod commented on Mar 24, 2025

    @SandPod
    Contributor

    Splitting out all user image management to a separate package library would make sense; the authentication module should be as non-intrusive as possible while still being simple to use.

    Since it is possible to use authentication without exposing that functionality to the client we should take this into consideration.

    To preserve backwards compatibility if we would like to do this in a minor version serverpod_auth_shared_flutter should be the superset of the flutter packages.

    This is also something we should take into consideration when designing the new authentication module.#3126

  4. vanlooverenkoen commented on Mar 24, 2025

    @vanlooverenkoen
    ContributorAuthor

    👍 maybe we should also add this issue to the list of #3126

  5. vanyasem commented on Jun 2, 2025

    @vanyasem

    Yep, I was quite surprised to see that the auth module triggered the AppStore warning about missing usage description.
    I also do not need any of the functionality that might require those libraries.

    While it doesn't really work in this particular case, as the source for the API usage is an external library, take a look at the approach taken by permission_handler: https://github.com/Baseflow/flutter-permission-handler/tree/main/permission_handler#setup (in the iOS (click to expand) section)
    It allows the user to specify compile-time flags in the app's Podfile to exclude parts of the functionality that aren't needed
    While somewhat ugly, it gets the job done. Might come in handy at some point

  6. SandPod commented on Jun 3, 2025

    @SandPod
    Contributor

    @vanyasem - Thanks for the tip! We are reworking the authentication package now, and there this split has already been made.

  7. marcelomendoncasoares commented on Mar 27, 2026

    @marcelomendoncasoares
    Collaborator

    Closing as completed since the referenced libraries are no longer depended upon on the new auth.

  8. moved this from Backlog 🗂️ to Done 🚀 in Serverpod Frameworkson Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: authenticationenhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions