AuthenticationTeamsPersonal account

Register User and Personal Account

The SAAS Starter kit comes with a teams setup out of the box. That means that a user can belong to several accounts instead of just one. There is also a concept of a personal account that can only have the user that created it as a team member. The creation of a personal account happens when the user registers.

The user registration functionality is based on the built in PhxGenAuth-generator that is built in with Phoenix. That means that the functionality closely mirrors what you expect if you have used that before.

Register the user

Visit http://localhost:4000/users/register 

In this example, I also have the posibility to signup with Github but I will cover that in another tutorial.

After the registration, you can see in the top right corner the user menu. If you click and expand it, there are the Accounts menu item

Accounts Page

The accounts page allows you to see the the accounts that you are a member of. From the start, you have a personal account that you cant add any new members to.

From this page, you can create additional accounts that you have the option to invite members to.

You don't want teams

If you don't want to have a teams feature, you can just remove this page and the show accounts page. The personal account is still created and you have the option to implement teams later. And when you use the built in resource generator, you have the option to make it account scoped. That means that if you plan to make a Todo-list, it can still belong to the user through the personal account. That makes it really easy to implement the teams feature in the future.