You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In FirebaseAuth/Sources/Swift/ActionCode/ActionCodeInfo.swift, the method actionCodeOperation(forRequestType:) uses all-uppercase string literals (e.g. "PASSWORD_RESET", "VERIFY_EMAIL") to match against the request type string received from the server.
Description
In
FirebaseAuth/Sources/Swift/ActionCode/ActionCodeInfo.swift
, the methodactionCodeOperation(forRequestType:)
uses all-uppercase string literals (e.g."PASSWORD_RESET"
,"VERIFY_EMAIL"
) to match against the request type string received from the server.However, Firebase uses camelCase for the
mode
parameter in action links, as documented here:https://firebase.google.com/docs/auth/custom-email-handler#create_the_email_action_handler_page
Because of this mismatch, the method always returns
.unknown
.Code Reference
https://github.com/firebase/firebase-ios-sdk/blob/HEAD/FirebaseAuth/Sources/Swift/ActionCode/ActionCodeInfo.swift#L43-L53
Suggested Fix
Update the switch statement to use camelCase keys to match the values provided by Firebase in the mode parameter.
Reproducing the issue
Expected behavior:
ActionCodeOperation
should correctly reflect the action specified in the mode parameter.Actual behavior:
ActionCodeOperation == .unknown
Firebase SDK Version
11.11.0
Xcode Version
16.3
Installation Method
Swift Package Manager
Firebase Product(s)
Authentication
Targeted Platforms
All
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippetReplace this line with the contents of your Package.resolved.
If using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippetReplace this line with the contents of your Podfile.lock!
The text was updated successfully, but these errors were encountered: