Here is a rough plan to allow having the same users/registration/login on Tatoeba and the wiki, based on cookie sharing:
- Disallow registration on the wiki.
- Manually match existing tatowiki users with existing Tatoeba users (we only have 242 tatowiki users so far, including invalid spammer accounts).
- Modify user ids in all the tables of tatowiki so that they are the same as Tatoeba’s user ids.
- On Tatoeba, upon login or registration, create an additional encrypted cookie containing id and username.
- On tatowiki, when accessing any page, check for the existence of that cookie. If that cookie is set and successfully decrypted, tatowiki automatically registers a new user if he doesn’t exist, and it automatically logs in the user if he’s not logged in.
- Make sure the session timeout of tatowiki is lower or equal than Tatoeba’s.
- On tatowiki, change the login link to point to the Tatoeba login page.
Another approach is to make tatowiki look up users from Tatoeba’s database. Users will still have to login separately, but they don’t have to register two times any more. It requires to:
- Disallow registration on the wiki.
- Modify user ids in all the other tables of tatowiki so that they are the same as Tatoeba’s user ids.
- Modify tatowiki’s password hashing algorithm to match Tatoeba’s (Tatoeba uses something pretty custom).
- Make tatowiki read users from the Tatoeba database (note that tatowiki is currently based on sqlite while Tatoeba uses MySQL).
Here is a rough plan to allow having the same users/registration/login on Tatoeba and the wiki, based on cookie sharing:
Another approach is to make tatowiki look up users from Tatoeba’s database. Users will still have to login separately, but they don’t have to register two times any more. It requires to: