Skip to content

Single sign-on with Tatoeba #3

Description

@jiru

Here is a rough plan to allow having the same users/registration/login on Tatoeba and the wiki, based on cookie sharing:

  1. Disallow registration on the wiki.
  2. Manually match existing tatowiki users with existing Tatoeba users (we only have 242 tatowiki users so far, including invalid spammer accounts).
  3. Modify user ids in all the tables of tatowiki so that they are the same as Tatoeba’s user ids.
  4. On Tatoeba, upon login or registration, create an additional encrypted cookie containing id and username.
  5. 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.
  6. Make sure the session timeout of tatowiki is lower or equal than Tatoeba’s.
  7. 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:

  1. Disallow registration on the wiki.
  2. Modify user ids in all the other tables of tatowiki so that they are the same as Tatoeba’s user ids.
  3. Modify tatowiki’s password hashing algorithm to match Tatoeba’s (Tatoeba uses something pretty custom).
  4. Make tatowiki read users from the Tatoeba database (note that tatowiki is currently based on sqlite while Tatoeba uses MySQL).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions