Create Consumer
Create OAuth consumer
Generate keys
Generate a pair of keys to encrypt the tokens. And store them outside of your document root (`web`
directory) for security.
- Visit /admin/config/people/simple_oauth
- Click Generate keys to generate encryption keys for tokens
- Fill in Directory for the keys.
- Click Generate.
You can also use `openssl`
to generate keys:
openssl genrsa -out private.key 2048openssl rsa -in private.key -pubout > public.key
Create Consumer
- Visit /admin/config/services/consumer/add
- Fill in the following values:
- Label:
`Next.js site`
- User:
`Select the user we created`
- Secret:
`Your secret`
- Scopes:
`Select the role we created`
- Click Save
Important: note the client id (uuid) and the secret. These are going to be used as environment variables for the Next.js site.