I’ve a Flutter app focusing on Android and iOS.
I’m utilizing Firebase Authentication and Firebase AppCheck.
That is working properly in Android. I’ve turned on AppCheck enforcement for Authentication and solely verified requests from my app are coming by, nice!
I’m now making an attempt to configure this for iOS. That is what I’ve accomplished:
- Added iOS app to Firebase challenge
- Added key to Apple Developer and linked it with AppCheck
- Added debug token to Firebase Console
- Ran
flutterfire configure
on my flutter challenge - Downloaded
GoogleService-info.plist
and added it to my challenge - Up to date AppDelegate.swift as per beneath:
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func software(
_ software: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return tremendous.software(software, didFinishLaunchingWithOptions: launchOptions)
}
}
Every little thing works superb. I’m able to log in with both e-mail/password or Google. Good!
I then seen that in Firebase Console there’s a new API that may be “enforced”. So along with Authentication (Beta) there’s “Google Identification for iOS”. Being a safety nerd I shortly clicked “implement” for this.
I do not actually perceive why is that this crucial. I believed that Authentication (Beta) already enforces any auth, together with Google. That is what appears to occur on Android. Couldn’t discover any rationalization on-line.
Anyway, to chop the lengthy story brief, after implementing this, I can’t log in utilizing Google any extra. I get “Entry Blocked: Authorization Error” and “Error 400: invalid_request”. In Firebase Console makes an attempt are logged as “Unverified: Outdated Consumer Requests”.
For full disclosure I’m utilizing iPhone 16 Professional Xcode simulator on a Mac.
I’m not certain what to do. I seemed in Google Cloud Console every little thing appears to be like OK. New iOS API key and repair had been created appropriately AFAIK. Auto generated iOS API key is just not utilizing any app restrictions, and I’ve even eliminated API restrictions in an try to troubleshoot this, with none success. If anything was unsuitable, like debug token, or firebase configuration, this is able to not work in any respect, i.e. e-mail/password auth could be failing, or Google auth wouldn’t work with AppCheck enforcement turned off. However every little thing is working superb, aside from “Google Identification for iOS”.
Any assist a lot appreciated.