Setup credentials
Login to ROQ Console (opens in a new tab), copy the needed credentials and paste them into the .env
file of
your web application. You need to add the ROQ_SECRET
variable. The value can be generated by
running openssl rand -hex 32
on the
command line.
Public variables, used on client-side
Variable | Description |
---|---|
NEXT_PUBLIC_ROQ_CLIENT_ID | Identifies the client on the client-side |
NEXT_PUBLIC_ROQ_PLATFORM_URL | Instance of ROQ Platform to which this environment is connected |
NEXT_PUBLIC_BASE_URL | Application base URL |
Server variables used for ROQ connection
Variable | Description |
---|---|
ROQ_BASE_URL | Application base URL |
ROQ_PLATFORM_URL | Instance of ROQ Platform to which this environment is connected |
ROQ_ENVIRONMENT_ID | Identifier of the environment, like "production- or staging-environment" |
ROQ_API_KEY | The ROQ API key secures the server-side interaction between your application and ROQ Platform. Keep confidential and don't exose it to the client-side. |
Server variables for ROQ auth
Variable | Description |
---|---|
ROQ_SECRET | The secret key is used to sign the JWT tokens for the session. You need to generate this key yourself using openssl rand -hex 32 on the command line. |
ROQ_CLIENT_ID | Identifies the client on the server-side |
ROQ_AUTH_CALLBACK_URL | Handles callbacks from the hosted login page after successful authentication. |
ROQ_AUTH_LOGIN_URL | Performs a secure redirect to the managed login and registration page |
ROQ_AUTH_LOGOUT_URL | Clears the session tokens. |
ROQ_AUTH_URL | The URL of the managed login and registration page. This URL can be customized. |
Additional configuration
The following parameters are optional and can be used for further adjustments:
Config variable | Description | Example |
---|---|---|
ROQ_SESSION_MAX_AGE | Maximum time (seconds) of an active session. Default: 30 days | 86400 (1 day) |
ROQ_SESSION_INACTIVITY_TIMEOUT | Maximum time (seconds) of allowed inactivity. Default: 24 hours | 43200 (12 hours) |