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
Fix issue where the user emails were not inserted in lower-case for OIDC providers returning non-lowercase emails.
6
+
7
+
If you are affected, you can manually fix you database state by running the following commands, to make account-linking from different login methods work smoothly.
8
+
9
+
```sql
10
+
UPDATE"users"
11
+
SET
12
+
"email"=lower("email")
13
+
WHERE
14
+
"email"<>lower("email")
15
+
;
16
+
```
17
+
18
+
19
+
```sql
20
+
UPDATE"supertokens_thirdparty_users"
21
+
SET
22
+
"email"=lower("email")
23
+
WHERE
24
+
"email"<>lower("email")
25
+
;
26
+
```
27
+
28
+
29
+
Fix issue where user emails were not inserted into the database in lowercase for invites, resulting in a mismatch of user account email and invite email that could not be accespted.
30
+
To cleanup your database of invites, run the following command to identify duplicate records and then manually fix them/clean them up.
31
+
32
+
```sql
33
+
SELECT
34
+
"organization_id"
35
+
, lower(email) AS key
36
+
, array_agg(json_object(array['email', 'code', 'expires_at'], array["email", "code", to_json("expires_at")::text])) AS records
0 commit comments