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
Copy file name to clipboardExpand all lines: README.md
+10-5
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,11 @@ The structure of this Document is as follows:
53
53
54
54
```
55
55
{
56
-
devices: Device[],
56
+
devices: {
57
+
deviceId1: Device,
58
+
deviceId2: Device,
59
+
...
60
+
},
57
61
userId: string,
58
62
}
59
63
```
@@ -62,11 +66,12 @@ A `Device` object contains the following:
62
66
63
67
```
64
68
{
65
-
deviceId: string, // The browser name and version
69
+
deviceId: string, // A randomly generated ID
66
70
fcmToken: string, // The FCM token
67
-
name: 'Unknown', // Web browser's do not provide a name field
71
+
name: string, // The browsername
68
72
os: string, // The OS of the device
69
-
type: 'Web'
73
+
type: 'Web',
74
+
userAgent: string // The browser user agent string
70
75
}
71
76
```
72
77
@@ -87,7 +92,7 @@ Returns a `DeviceStore`.
87
92
88
93
Indicate to the DeviceStore that the user is about to sign out, and the current device token should be removed.
89
94
90
-
This cannot be done automatically with `onAuthStateChanged` as the user won't have permission to remove the token from Firestore as they are already signed out by this point and the Cloud Firestore security rules will prevent the database deletion.
95
+
This can't be done automatically with `onAuthStateChanged` as the user is already signed out at this point. This means the Cloud Firestore security rules will prevent the database deletion as they no longer have the correct user permissions to remove the token.
0 commit comments