Downside
I am integrating Firebase Authentication to a iOS challenge and fighting "Electronic mail Hyperlink Authentication". Following the rule I arrange every part in Console and run this code to login the consumer:
func signInWithLink(e mail: String) async throws {
let settings = ActionCodeSettings()
settings.url = URL(string: AppConfig.emailLoginBacklink)!
settings.iOSBundleID = Bundle.essential.bundleIdentifier!
settings.handleCodeInApp = true
// Implicitly specify `nil` as a result of it is necessary, see under.
settings.dynamicLinkDomain = nil
strive await auth.sendSignInLink(toEmail: e mail, actionCodeSettings: settings)
}
Errors
I instantly acquired this error:
Error Area=FIRAuthErrorDomain Code=17999 "An inner error has occurred, print and examine the error particulars for extra data." UserInfo={NSUnderlyingError=0x3038c64c0 {Error Area=FIRAuthInternalErrorDomain Code=3 "(null)" UserInfo={NSUnderlyingError=0x3038c7a50 {Error Area=com.google.HTTPStatus Code=400 "(null)" UserInfo={information={size = 288, bytes = 0x7b0a2020 22657272 6f72223a 207b0a20 ... 5d0a2020 7d0a7d0a }, data_content_type=utility/json; charset=UTF-8}}, FIRAuthErrorUserInfoDeserializedResponseKey={
code = 400;
errors = (
{
area = world;
message = "DYNAMIC_LINK_NOT_ACTIVATED : FDL area will not be configured";
cause = invalid;
}
);
message = "DYNAMIC_LINK_NOT_ACTIVATED : FDL damain will not be configured";
}}}, FIRAuthErrorUserInfoNameKey=ERROR_INTERNAL_ERROR, NSLocalizedDescription=An inner error has occurred, print and examine the error ditails for extra data.}
… which signifies that dynamicLinkDomain
should not be nil, I suppose?
Meditations & Experiments
I am conscious that Dynamic Hyperlinks are deprecated and we do not use any. The doc says that if the dynamicLinkDomain
is empty the primary area will likely be used:
- dynamicLinkDomain: When a number of customized dynamic hyperlink domains are outlined for a challenge, specify which one to make use of when the hyperlink is to be opened by way of a specified cellular app (for instance, instance.web page.hyperlink). In any other case the primary area is mechanically chosen.
This means that FDL must be enabled, is not it? I hope FB consultants will reply under. In the meantime I attempted one other configuration:
settings.dynamicLinkDomain = URL(string: "myuniversallink.com")
Right here, "myuniversallink.com" is a website that we use for Common Hyperlinks within the app. Not surprisingly, it did not work:
Error Area=FIRAuthErrorDomain Code=17999 "An inner error has occurred, print and examine the error particulars for extra data." UserInfo={NSLocalizedDescription=An inner error has occurred, print and examine the error particulars for extra data., FIRAuthErrorUserInfoNameKey=ERROR_INTERNAL_ERROR, NSUnderlyingError=0x302f860d0 {Error Area=FIRAuthInternalErrorDomain Code=3 "(null)" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={
code = 400;
errors = (
{
area = world;
message = "INVALID_DYNAMIC_LINK_DOMAIN";
cause = invalid;
}
);
message = "INVALID_DYNAMIC_LINK_DOMAIN";
}, NSUnderlyingError=0x302e10cf0 {Error Area=com.google.HTTPStatus Code=400 "(null)" UserInfo={information={size = 228, bytes = 0x7b0a2020 22657272 6f72223a 207b0a20 ... 5d0a2020 7d0a7d0a }, data_content_type=utility/json; charset=UTF-8}}}}}
So be fore FDL was not activated, now it is invalid and it seems to be like there is no approach round.
Query
The best way to allow Electronic mail Hyperlink Authentication with out Dynamic Hyperlinks?
Configuration
GoogleSignIn – 8.0.0
Firebase – 11.6.0
iOS – 18.0.1
Min iOS supported by challenge – 16.6