# User Registration and Login ## Email+Organization Credential-Based Login ```plantuml skinparam backgroundColor #fff skinparam handwritten false skinparam BoxPadding 10 skinparam ParticipantPadding 10 skinparam NoteFontSize 24 skinparam NoteBorderColor #f80 skinparam NoteBackgroundColor #fea skinparam sequenceArrowThickness 1 skinparam sequence { BoxFontSize 36 BoxBorderColor #555 BoxBackgroundColor #fbfbfb ActorFontColor #333 ActorFontSize 24 ActorFontName Arial ActorBorderColor #555 ActorBackgroundColor #ccc ParticipantFontName Arial ParticipantFontSize 24 ParticipantFontColor #333 ParticipantBorderColor #555 ParticipantBackgroundColor #eee LifeLineBorderColor #ccc LifeLineBackgroundColor #000 ArrowFontSize 24 ArrowColor #f80 DividerFontSize 24 } actor User participant Webpage participant Agent actor Admin == Registration == Admin -> Agent: Can create a new organization at any time Admin -> Agent: Creates a user, selects an organization if one exists. Agent -> User: Sends email with a link User -> Webpage: Follows link to account setup page Webpage -> User: Displays QR code User -> Agent: User scans the QR code to connect Agent -> User: Sends email credential offer Agent -> User: Sends organization credential offer User -> Webpage: Accepts email credential User -> Webpage: Accepts organization credential note over Agent: Finalizes account Agent -> Webpage: Notice of completion note over Webpage: Redirected to home page == Login == Webpage -> User: Displays "Login with Credential" QR code User -> Agent: Scans QR code on the home page to connect Agent -> User: Sends presentation requests User -> Agent: Sends presentations of email & organization credential note over Agent: Verifies the credentials;\nUser and organization data is\nprocessed by the system Agent -> Webpage: Notifies webpage of session state note over Webpage: Home page state\nis updated so the\nuser is logged in ``` ## Old ```plantuml skinparam backgroundColor #fff skinparam handwritten false skinparam BoxPadding 10 skinparam ParticipantPadding 10 skinparam NoteFontSize 24 skinparam NoteBorderColor #f80 skinparam NoteBackgroundColor #fea skinparam sequenceArrowThickness 1 skinparam sequence { BoxFontSize 36 BoxBorderColor #555 BoxBackgroundColor #fbfbfb ActorFontColor #333 ActorFontSize 24 ActorFontName Arial ActorBorderColor #555 ActorBackgroundColor #ccc ParticipantFontName Arial ParticipantFontSize 24 ParticipantFontColor #333 ParticipantBorderColor #555 ParticipantBackgroundColor #eee LifeLineBorderColor #ccc LifeLineBackgroundColor #000 ArrowFontSize 24 ArrowColor #f80 DividerFontSize 24 } actor User participant Webpage participant Agent actor Admin == Registration == Admin -> Agent: Invites a user Agent -> User: Sends email with a link User -> Webpage: Follows link to account setup page Webpage -> User: Displays QR code User -> Agent: User scans the QR code to connect Agent -> User: Sends email credential offer User -> Webpage: Accepts email credential note over Agent: Finalizes account Agent -> Webpage: Notice of completion note over Webpage: Redirected to home page == Organization == Admin -> Agent: Creates new user group Admin -> Agent: Assigns the user to an organization Agent -> User: Sends an organization credential offer User -> Agent: Accepts organizational credential == Login == Webpage -> User: Displays "Login with Credential" QR code User -> Agent: Scans QR code on the home page to connect Agent -> User: Sends presentation requests User -> Agent: Sends presentation of email & organization credential note over Agent: Verifies the credentials;\nUser and organization data is\nprocessed by the system Agent -> Webpage: Notifies webpage of session state note over Webpage: Home page state\nis updated so the\nuser is logged in ```