File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Services Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -427,7 +427,19 @@ public extension AuthService {
427427 throw AuthServiceError
428428 . invalidEmailLink ( " email address is missing from app storage. Is this the same device? " )
429429 }
430- let link = url. absoluteString
430+ let urlString = url. absoluteString
431+
432+ // Extract the actual auth link from Firebase Dynamic Link
433+ guard let dynamicLink = CommonUtils . getQueryParamValue ( from: urlString, paramName: " link " ) else {
434+ throw AuthServiceError
435+ . invalidEmailLink ( " Dynamic Link 'link' parameter is missing from the email link URL " )
436+ }
437+
438+ guard let link = dynamicLink. removingPercentEncoding else {
439+ throw AuthServiceError
440+ . invalidEmailLink ( " Failed to decode Link URL " )
441+ }
442+
431443 guard let continueUrl = CommonUtils . getQueryParamValue ( from: link, paramName: " continueUrl " )
432444 else {
433445 throw AuthServiceError
You can’t perform that action at this time.
0 commit comments