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
With the deprecation of Firebase Dynamic Links you will need to change the way you handle email link authentication as you will no longer receive the `DynamicLinkEvent.RECEIVED` event.
13
+
14
+
You should remove the Firebase Dynamic Links extension from your application as it is no longer required for email link authentication.
15
+
16
+
17
+
<Tabs
18
+
groupId="packagemanager"
19
+
defaultValue="apm"
20
+
values={[
21
+
{label: 'APM', value: 'apm'},
22
+
{label: 'Manual', value: 'manual'},
23
+
]}>
24
+
25
+
<TabItemvalue="apm" >
26
+
27
+
To remove the Firebase Dynamic Links extension using the AIR Package Manager (`apm`), you can run the following commands:
28
+
29
+
```bash
30
+
apm uninstall com.distriqt.firebase.DynamicLinks
31
+
apm generate app-descriptor
32
+
```
33
+
34
+
</TabItem>
35
+
<TabItemvalue="manual" >
36
+
37
+
Remove the `com.distriqt.firebase.DynamicLinks` extension from your application descriptor and remove the extension from your project.
38
+
Remove any entries in the manifest that relate to the Firebase Dynamic Links extension.
39
+
Ensure you remove the `com.distriqt.firebase.DynamicLinks` extension entry from your `extensions` list in the application descriptor.
40
+
41
+
</TabItem>
42
+
43
+
</Tabs>
44
+
45
+
In the past you would have used the `DynamicLinkEvent.RECEIVED` event to handle the email link authentication, however now you will need to use the `FirebaseAuthEvent.EMAIL_LINK_RECEIVED` event instead.
Follow the [email link integration guide](provider/email-link.mdx) to set the host value (`<PROJECT_ID>.firebaseapp.com`) or your custom domain" correctly.
You can use Firebase Authentication to sign in a user by sending them an email containing a link,
7
10
which they can click to sign in. In the process, the user's email address is also verified.
8
11
@@ -35,7 +38,7 @@ Firebase send the authentication link to the user's email.
35
38
36
39
1. Construct the ActionCodeSettings object, which provides Firebase with instructions on how to construct the email link. Set the following fields:
37
40
-`url`: The deep link to embed and any additional state to be passed along. The link's domain has to be whitelisted in the Firebase Console list of authorized domains, which can be found by going to the Sign-in method tab (Authentication -> Sign-in method). The link will redirect the user to this URL if the app is not installed on their device and the app was not able to be installed.
38
-
- `androidPackageName` and `IOSBundleId`: The apps to use when the sign-in link is opened on an Android or iOS device. Learn more on how to configure Firebase Dynamic Links to open email action links via mobile apps.
41
+
-`androidPackageName` and `IOSBundleId`: The apps to use when the sign-in link is opened on an Android or iOS device.
39
42
-`handleCodeInApp`: Set to `true`. The sign-in operation has to always be completed in the app unlike other out of band email actions (password reset and email verifications). This is because, at the end of the flow, the user is expected to be signed in and their Auth state persisted within the app.
40
43
41
44
2. Ask the user for their email.
@@ -80,38 +83,133 @@ At this point the user will need to check their email and click on the link in t
80
83
81
84
### URL
82
85
83
-
For the URL we generally suggest you use your Firebase app url (`https://PROJECT_ID.firebaseapp.com`). This normally can be found by checking the *Authorized Domains* in the Firebase Console under *Authentication > Sign in Method*
86
+
For the URL, Firebase suggests you use your Firebase app url (`https://PROJECT_ID.firebaseapp.com`). This normally can be found by checking the *Authorized Domains* in the Firebase Console under *Authentication > Sign in Method*
84
87
85
-
Using this method and adding the Dynamic Links extension simplifies the development and integration required.
88
+
Using this method simplifies the development and integration required.
86
89
87
90
This guide will assume this approach however you can use whatever approach suits you needs to handle the url redirection.
88
91
89
92
90
93
## Complete sign in with the email link
91
94
92
95
93
-
### Add Dynamic Links
96
+
### Completing sign-in in an Android App
94
97
95
-
Firebase Auth uses Firebase Dynamic Links when sending a link that is meant to be opened in a mobile application. In order to use this feature, Dynamic Links must be configured in the Firebase Console.
98
+
Firebase Authentication uses Firebase Hosting to send the email link to a mobile device. For sign-in completion via mobile application, the application has to be configured to detect the incoming application link, parse the underlying deep link and then complete the sign-in. To learn more, see [Android App Links documentation](https://developer.android.com/training/app-links).
96
99
97
-
Follow the guide to add the Dynamic Links extension to your application:
Firebase Authentication uses Firebase Hosting domains when creating and sending a link that is meant to be opened in a mobile application. A default Firebase Hosting domain has already been configured for you.
101
104
102
-
Now you can listen for the user to click on the link in the email
105
+
1. Configure Firebase Hosting domains:
103
106
104
-
```actionscript
105
-
FirebaseDynamicLinks.service.addEventListener(
106
-
DynamicLinkEvent.RECEIVED,
107
-
dynamicLink_receivedHandler );
107
+
In the Firebase console, open the Hosting section.
108
+
- If you want to use the default domain for the email link that opens in mobile applications, go to your default site and take note of your default Hosting domain. A default Hosting domain typically looks like this: `PROJECT_ID.firebaseapp.com`. You'll need this value when you configure your app to intercept the incoming link.
109
+
- If you want to use a custom domain for the email link, you can register one with Firebase Hosting and use that for the link's domain.
108
110
109
-
function dynamicLink_receivedHandler( event:DynamicLinkEvent ):void
In order to handle these links from your Android application, your app's package name needs to be specified in the Firebase console project settings. In addition, the SHA-1 and SHA-256 of the application certificate need to be provided.
112
114
113
-
// This could be the email link
115
+
To configure your Android application, follow these steps:
116
+
117
+
<Tabs
118
+
groupId="packagemanager"
119
+
defaultValue="apm"
120
+
values={[
121
+
{label: 'APM', value: 'apm'},
122
+
{label: 'Manual', value: 'manual'},
123
+
]}>
124
+
125
+
<TabItemvalue="apm" >
126
+
127
+
```bash
128
+
apm generate config android
129
+
```
130
+
131
+
Edit the `AndroidManifest.xml` that was created at `config/android/AndroidManifest.xml` file to include the following intent filter:
It's important that the `<activity>` element has no attributes and that you leave the first `<intent-filter>` element as is,
200
+
as this is required for the AIR application to be launched correctly.
201
+
202
+
Also you must replace `<PROJECT_ID>.firebaseapp.com` with your actual domain, either `<PROJECT_ID>.firebaseapp.com` or your custom domain.
203
+
:::
204
+
205
+
When users open a hosting link in your Android app, the app will be launched and the extension will receive the link and dispatch the `FirebaseAuthEvent.EMAIL_LINK_RECEIVED` event:
function emailLink_receivedHandler( event:FirebaseAuthEvent ):void
211
+
{
212
+
// Handle the email link authentication here
115
213
}
116
214
```
117
215
@@ -156,10 +254,25 @@ function signInWithEmailLink_completeHandler( event:FirebaseAuthEvent ):void
156
254
Of course you can use your global `FirebaseAuthEvent.AUTHSTATE_CHANGED` to listen for sign in success as well as this handler.
157
255
158
256
257
+
### Linking/re-authentication with email link
258
+
259
+
You can also link this method of authentication to an existing user. For example a user previously authenticated with another provider, such as a phone number, can add this method of sign-in to their existing account.
260
+
261
+
```actionscript
262
+
var credential:AuthCredential = EmailAuthProvider.getEmailLinkCredential( email, link );
263
+
264
+
var user:FirebaseUser = FirebaseAuth.service.getCurrentUser();
265
+
266
+
user.linkWithCredential( credential );
267
+
```
268
+
159
269
160
270
161
271
## Differentiating email/password from email link
162
272
273
+
:::warning Deprecated
274
+
This functionality has been deprecated in order to improve user account security.
275
+
:::
163
276
164
277
In case you support both password and link-based sign in with email, to differentiate the method of sign in for a password/link user, use `fetchSignInMethodsForEmail()`. This is useful for identifier-first flows where the user is first asked to provide their email and then presented with the method of sign-in:
Copy file name to clipboardExpand all lines: docs/firebase/changelog.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,37 @@
1
+
### 2025.08.26 [v11.0.0]
2
+
3
+
```
4
+
## Major update
5
+
6
+
This release implements the latest versions the Firebase SDK:
7
+
- Android BOM v34.1.0
8
+
- iOS v12.1.0
9
+
10
+
The major change is the deprecation and removal of the Dynamic Links extension. This has an impact if you are using the email link authentication method and the Auth extension has been updated to use the latest method.
11
+
This affects anyone using the email link authentication method, as the new method does not require Dynamic Links and uses a different approach to handle the email link.
12
+
13
+
> Deprecated: Firebase Dynamic Links is deprecated and should not be adopted in projects that don't already use it. The service will shut down on August 25, 2025. See the [Dynamic Links Deprecation FAQ](https://firebase.google.com/support/dynamic-links-faq) for more information.
14
+
15
+
See the migration guide: https://docs.airnativeextensions.com/docs/firebase/migrating-to-v11.0
0 commit comments