Request for Ash Multitenant and Ash Authentication

Hi all,

I am looking for an example that demonstrate how to build a Phoenix app using Ash multi tenant with separate schema and Ash authentication for authentication.

Any Git repo or sample code I can refer to?

1 Like

The setup for ash_authentication should be the same regardless of if you are using multitenancy or not. Is there a particular part of it that is not working as expected?

Thank you for the reply, @zachdaniel. I am yet to figure out how to have a context multi-tenant application with centralized users, organisations, and user_organisations tables while other tables are within the tenant schema, so that the following flow can be achieved:

  1. User registers.
  2. User creates an organisation as the owner.
  3. The system creates the organisation and automatically runs organisation migrations.
  4. When the user signs in, they are redirected to the organisation based on the current_organisation_id value in the users table.

1 Like

My issue was resolved. I will soon be writing a post about the same.

6 Likes