Create Role and User

Create a role and user for OAuth Consumer


The Next.js module, paired with the `next-drupal` plugin, makes it easy to create Next.js preview routes.

We use an OAuth consumer to access preview routes.

Before we can create an OAuth consumer, we need to create a new role and a user for OAuth scopes.

Create Role

  1. Visit /admin/people/roles.
  2. Click on + Add role.
  3. Fill in the Role name. Example: Next.js Site.

Assign Permissions

Next, assign the following permissions to the newly created role.

  • Bypass content access control
  • Issue subrequests
  • View user information

We are assigning the Bypass content access control permission to allow Next.js to access unpublished content and revisions.

You can safely skip this permission if you do not need to preview unpublished content.

Create User

Add a new user at `/admin/people/create` and assign it the role we created above.