# User management

Would you like to make certain portions of your app visible only to logged in users? Would you like to define user groups and organize access based on their membership to a specific user group. \
\
There are two ways to use the User management.&#x20;

1. Open access app: customers sign themselves up for an account in the app. \
   \- You can enable content for registered users\
   \- Or you can give them a specific role or assign them to a user group afterwards to give them access to the content that's relevant to them.
2. Closed access app: you enter all the email addresses of the people who are allowed to sign in, to make sure no other people can login.

### Login settings

You can configure this in the left vertical menu under  **App users > Login settings.**\
On this page you can manage your settings at **Enable** **User Authentication** in the top right corner.

### Login screen

<figure><img src="/files/uJYrRmX3rgc1Za2Y8PsR" alt="Login settings"><figcaption><p>Login Settings</p></figcaption></figure>

* **Users need to login before they can use the app** is needed when you want to force users to login before they can see anything of your app. This makes sense if you have an app in the public facing app stores, but you want to make the information only available for specific people.\
  When this setting is disabled users can use parts of your app or your whole app without the need of logging in.
* The **Welcome text** will be shown on the login screen. You can use this to explain to customer why they need to login.

### Registration&#x20;

There are multiple ways to let your customers register for the app.&#x20;

* **User can register a new account for this app**\
  If this is disabled, people will not be able to create accounts for the app themselves. This allows you to control who has access to the app. The app owner will need to add the email addresses of the users in the **App Users > Users** screen. \
  If you enable this setting, customers can create new accounts themselves.&#x20;

> This doesn't mean that a logged in user will directly see all the information in your app. \
> You can influence the visibility of parts of your app using user groups or roles via a Lock block. \
> After a user created an account, you can assign them to right role or group, to give them access to the parts they are allowed to see.&#x20;

When you allow users to create accounts, you can specify how they can create accounts. For Facebook, Google and Apple Sign in you will need to create login details at those platforms before you can enable them:&#x20;

* Mail
* [Facebook](/app-details/user-management/create-facebook-app-id-secret.md)&#x20;
* Google
* [Apple sign in](/app-details/user-management/create-apple-sign-in-key.md)

**Please note:** Apple will only allow apps with user registration via Facebook or Google if you have also enabled Apple Sign-in. Read this article how to create the [Apple Sign in key](/app-details/user-management/create-apple-sign-in-key.md).

### App Users

If you have enabled User Authentication your app will have App Users. You can find these in the  left side menu under App Users > Users

<figure><img src="/files/qV8bc1oY7l1eaRus1Uwn" alt="App Users overview"><figcaption><p>App Users</p></figcaption></figure>

In this overview you see all your **App Users**, their roles and the date they registered their account. You can also manually **add a new user** by clicking the **New User button** in the top right corner. This will open a modal where you can enter the user details and select a role you want to give the user.

<figure><img src="/files/pF1MfwMagpPGuvEvFi1l" alt="Add new user modal"><figcaption><p>Add new user modal</p></figcaption></figure>

If you want to edit an existing user, click on that user to open the **User Detail** page and click **Edit Details**<br>

<figure><img src="/files/MHnhtHS5mHwGaRgcsfKf" alt="User Detail"><figcaption><p>User Detail</p></figcaption></figure>

This will open a modal where you can edit User Details, reset their password or delete the user

<figure><img src="/files/FYLD4qeXUZ92nkaRKqUA" alt="Edit user modal"><figcaption><p>Edit User</p></figcaption></figure>

### Roles and permissions

You can assign different roles to your users, as you can see below these roles are:

* Unauthorized
* Registered
* Customer
* Employee
* Manager
* Admin

<figure><img src="/files/GgpiMFyARLwrJFrFJlqb" alt="Roles"><figcaption></figcaption></figure>

Within the Data tab of the Designer you are now able to set **custom permissions** for your tables. These roles are based on the **User roles** in your app. You can click on the Add custom permissions button to adjust the permissions per role. You can adjust these per table.

<figure><img src="/files/wUKIzv6094SUOCZ81smG" alt="user permissions"><figcaption></figcaption></figure>

### User groups

You can also organize users into **User groups**. \
You can use these user groups to unlock for specific groups via a Lock block in your app.\
\
In the future it will also become possible to send push messages to specific user groups. For now you can do that via Push message categories

<figure><img src="/files/g9W7Woodcgl0AQU4wbz8" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appmachine.com/app-details/user-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
