Skip to content

Missing ibi (iOS bundle ID) parameter on generated email link authentication URLs #726

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

Closed
jesuslosada opened this issue Oct 3, 2023 · 0 comments

Comments

@jesuslosada
Copy link
Contributor

jesuslosada commented Oct 3, 2023

Describe your environment

  • Operating System version: Ubuntu 22.04
  • Firebase SDK version: 6.2.0
  • Firebase Product: auth
  • Python version: 3.11
  • Pip version: 23.2.1

Describe the problem

The URLs generated by firebase_admin.auth.generate_sign_in_with_email_link() include the relevant Android parameters (apn - Android package name, amv - Android minimum version) but the iOS bundle ID passed through ActionCodeSettings.ios_bundle_id is ignored and there is no ibi parameter in the resulting URL.

Steps to reproduce:

  1. Initialize a firebase_admin.auth.ActionCodeSettings object assigning a ios_bundle_id value.
  2. Generate an email link authentication URL by calling firebase_admin.auth.generate_sign_in_with_email_link() with the previously generated ActionCodeSettings.

The parameter named currently used by firebase-admin is iosBundleId (see

parameters['iosBundleId'] = settings.ios_bundle_id
), while the expected name is iOSBundleId according to the documentation here: https://cloud.google.com/identity-platform/docs/reference/rest/v1/projects.accounts/sendOobCode

Relevant Code:

import firebase_admin
import firebase_admin.auth


firebase_admin.initialize_app()


def main():
    action_code_settings = firebase_admin.auth.ActionCodeSettings(
        url="https://example.firebaseapp.com/email-link-test",
        handle_code_in_app=True,
        ios_bundle_id="your.app.bundle",
        android_package_name="your.app.package",
        android_install_app=True,
        android_minimum_version="1",
        dynamic_link_domain="example.page.link",
    )
    email = "example@example.com"
    link = firebase_admin.auth.generate_sign_in_with_email_link(
        email, action_code_settings
    )
    print(link)


if __name__ == "__main__":
    main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants