How to change email?

Hi @Przemek_Skw, there are a lot of options, depending on your setup. Do you have an SSO set up on a shared host, or are you setting GRIST_DEFAULT_EMAIL on an installation on your personal computer? One general method that could help with any method is to go back to being you@example.com for a bit, and sharing the site (if you are using GRIST_SINGLE_ORG) or individual document with the new email address.

An alternative, if this is just on your computer, would be to edit the “home database”. With default settings, you can find it as home.sqlite3:

Make sure to shut Grist down and take backups before trying this. You can remap email addresses in the logins table of this file using the sqlite3 tool:

$ sudo sqlite3 home.sqlite3 
SQLite version 3.37.2 2022-01-06 13:25:41
Enter ".help" for usage hints.
sqlite> .mode box
sqlite> select * from logins;
┌────┬─────────┬────────────────────────┬────────────────────────┐
│ id │ user_id │         email          │     display_email      │
├────┼─────────┼────────────────────────┼────────────────────────┤
│ 1  │ 1       │ anon@getgrist.com      │ anon@getgrist.com      │
│ 2  │ 2       │ thumbnail@getgrist.com │ thumbnail@getgrist.com │
│ 3  │ 3       │ everyone@getgrist.com  │ everyone@getgrist.com  │
│ 4  │ 4       │ support@getgrist.com   │ support@getgrist.com   │
│ 5  │ 5       │ you@example.com        │ you@example.com        │
│ 6  │ 6       │ thing@example.com      │ thing@example.com      │
└────┴─────────┴────────────────────────┴────────────────────────┘
sqlite> update logins set email = 'new@email', display_email = 'new@email' where email = 'you@example.com';
sqlite> select * from logins;
┌────┬─────────┬────────────────────────┬────────────────────────┐
│ id │ user_id │         email          │     display_email      │
├────┼─────────┼────────────────────────┼────────────────────────┤
│ 1  │ 1       │ anon@getgrist.com      │ anon@getgrist.com      │
│ 2  │ 2       │ thumbnail@getgrist.com │ thumbnail@getgrist.com │
│ 3  │ 3       │ everyone@getgrist.com  │ everyone@getgrist.com  │
│ 4  │ 4       │ support@getgrist.com   │ support@getgrist.com   │
│ 5  │ 5       │ new@email              │ new@email              │
│ 6  │ 6       │ thing@example.com      │ thing@example.com      │
└────┴─────────┴────────────────────────┴────────────────────────┘

(sudo needed if OS user id within docker is different). One thing: if you’ve already logged in with the new email at some point, then there will already be a new conflicting row in the table for that - in that case, just remap it to another dummy email to get it out of the way first).