Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[firebase_auth]: ActionCodeOperation mapping fails due to incorrect requestType casting in ActionCodeInfo #17452

Open
@emisanpre

Description

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Auth

Which platforms are affected?

iOS

Description

I've already reported this issue in Firebes iOS SDK firebase/firebase-ios-sdk#15010.

In FirebaseAuth/Sources/Swift/ActionCode/ActionCodeInfo.swift, the method actionCodeOperation(forRequestType:) uses camelCase (e.g. "resetPassword", "verifyEmail") to match against the request type string received from the server.

This method should use SCREAMING_SNAKE_CASE.

Because of this mismatch, the method always returns .unknown.

The iOS SDK works as expected, probably the bug comes from flutterfire? I'm not sure.

Reproducing the issue

  1. In flutter, try to check an action code:
final action = await _auth.checkActionCode(emailLink.code);
final operation = action.operation;
final isEmailValidation = operation == ActionCodeInfoOperation.verifyEmail;
  1. When passed to actionCodeOperation(forRequestType:), the internal mapping in ActionCodeInfo returns .unknown.
  2. On iOS isEmailValidation is false, because operation is always returning ActionCodeInfoOperation.unknown.

Firebase Core version

3.14.0

Flutter Version

3.32.2

Relevant Log Output

Flutter dependencies

Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

Debug screenshots:
Image
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /