When users first sign up to your app or service, you can automatically assign them roles and permissions. This means users are able to interact with your application immediately - in the way you define - without waiting for additional access. For example, you might assign everyone a role for basic access permissions, and assign more advanced functions on request.
You can also set up default roles in organizations if you are on the Kinde Scale plan.
This topic covers default roles for applications and for organizations.
permissions
roles
- Go to Settings > Roles. If you already have roles set up, these are shown here.
- Select Add role. The Add role window opens.
- Give the role a Name. Keep it short and descriptive, so you can easily understand what it is for. For example, ‘Basic access’.
- Enter a Description. Describe what a user with this role can do. For example ‘Allows anyone assigned this role basic system access.’
- Enter a Key. The key is how your code references the role in Kinde. Ideally, it’s a word that is easy to reference in code and match in your product. You should also follow a naming convention to help maintain your code. E.g.
basic-system-access
.
- Select the Assign to new users option.
- Select the permissions that are included in the role by switching them on.
- Select Save. All new users who sign up to your application will be assigned this role.
- If you want to make this a default role in an organization, see the procedure below.
This procedure assumes you have roles and permissions set up already.
- Go to Settings > User management > Roles.
- Find the role you want to make default, select the three dots menu then Edit role.
- In the dialog that opens, switch on the Assign to new users option.
- Select Save.
This procedure assumes you have roles and permissions set up already, that you are on a Scale plan, and have activated the advanced features for the target organization.
- Go to Organizations and view the details of the organization you want to edit.
- Select Policies.
- In the Default roles section, switch on the roles you want to be assigned by default when users join the organization.
- Select Save.