Anonymous accounts + roles
I currently have a backend that uses Firebase Auth to create a custom auth token for anonymous users when they visit my site. This is to be stored in their cookies and then used in future. This way users don't have to login to use my site. I have 2 types of users, normal main site users and "guest" users who are only using 1 subsect of my site and so have restricted access to not allow main site actions. 
Currently I do this by creating 1 custom token with a "guest" additional property and one without (normal user). 
I'm planning on implementing this now in Better Auth by adding the anonymous sign up plugin(https://www.better-auth.com/docs/plugins/anonymous). Then anonymously signing the user in when they visit the main or the "guest" site and giving the guest user a special guest role. Given I haven't ever managed roles, I'm getting conflicting voices on whether it would be best to use Organizations (https://www.better-auth.com/docs/plugins/organization) or extended core schema (https://www.better-auth.com/docs/concepts/database#extending-core-schema) to add roles to my backend.
Does my current anonymous account setup sound sensible and should I use extended core schema or organizations to add roles to it? Thanks
Organization | Better Auth
The organization plugin allows you to manage your organization's members and teams.
Database | Better Auth
Learn how to use a database with Better Auth.
0 Replies