Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Users Schema

Paul Frazee edited this page Dec 31, 2016 · 21 revisions

Layout

  • main
    • township-access: Stores the users' access scopes (rights)
    • township-auth: Map of key => Auth object.
    • township-auth-indexes: Map of email => Auth object.
    • township-token: Stores invalidated tokens.
    • account: Map of key => Account object.
      • indexes: Index of username => key, profileUrl => key.

Auth object

Schema:

{
  key: String, uuid
  basic: {
    email: String
    hash: String, hashed password
    salt: String, salt used on hashed password
  }
}

Account object

Schema:

{
  username: String, the chosen username
  profileUrl: String, the url of the profile dat
  createdAt: Number, the timestamp of creation time
  
  isEmailVerified: Boolean
  emailVerifyNonce: String, the random verification nonce

  isProfileDatVerified: Boolean
  profileVerifyToken: String, the profile verification token (stored so the user can refetch it)
}
Clone this wiki locally