Drawback
I am integrating Firebase Authentication to a iOS mission and combating "E-mail Hyperlink Authentication". Following the rule of thumb I arrange all the pieces 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.principal.bundleIdentifier!
settings.handleCodeInApp = true
// Implicitly specify `nil` as a result of it is vital, see under.
settings.dynamicLinkDomain = nil
attempt await auth.sendSignInLink(toEmail: e mail, actionCodeSettings: settings)
}
Errors
I instantly obtained this error:
Error Area=FIRAuthErrorDomain Code=17999 "An inside 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=software/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 inside error has occurred, print and examine the error ditails for extra data.}
… which implies 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 can be used:
- dynamicLinkDomain: When a number of customized dynamic hyperlink domains are outlined for a mission, 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 suggests that FDL ought to 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 inside error has occurred, print and examine the error particulars for extra data." UserInfo={NSLocalizedDescription=An inside 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=software/json; charset=UTF-8}}}}}
So, earlier than FDL was not activated, now it is invalid and it seems to be like there is not any means round.
Query
Methods to allow E-mail Hyperlink Authentication with out Dynamic Hyperlinks?
Configuration
GoogleSignIn – 8.0.0
Firebase – 11.6.0
iOS – 18.0.1
Min iOS supported by mission – 16.6