Skip to content

Latest commit

 

History

51 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Login

This login system can be used as the backbone for a Single Sign On (SSO) system. It deviates from the concept that an account belongs to a single user. But rather an account is linked to many profiles (each represents a user) that has some level of access to the account.

Read more about it at concept.

We will start by explaining the Account schema.

Account schema:

  1. id - A UUID.
  2. Profiles - A list of Profiles
  3. Owner - Most importantly, an owner; with a restriction that there can only be 1 owner at a time. In hopes of keeping thing simple to manage.

Profile

  1. id - A UUID.
  2. Name - something to call it other than by ID. It can be a nickname or online handle.
  3. UserInfo structure.
    1. First name.
    2. Email address.
    3. Last name.
    4. Phone number.
  4. List of avatars (this is purely for fun) IDs.
  5. List of registered ClientApp IDs that were registered upon login.

It works better to think of a Profile as a container for a user's information.

AccountLink schema:

  • AccountLinkID
  • ProfileID
  • LoginType Either email or oidc.

To retrieve accounts quickly, we use an AccountLink system. Which uses a username-password or OIDC provider info to look up an account when the user logs in. Simply put, this is a foreign-key system.


About

A login system for internet applications written in Golang.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages