Dev mode
Dev mode
Since 0.10.0, there is a local dev mode available. It can only be enabled if the NODE_ENV environment variable is not set to prod/production AND dev mode is explicitly enabled in the config. The dev mode is for local and offline development and returns a static user object that can be configured in the config or by variables in .env.
The following fields in the returned user object can be configured:
claims:devMode.claimssettingprovider:devMode.providersettinguserName:devMode.userNamesettinguserInfo:devMode.userInfosettingidToken:devMode.idTokensettingaccessToken:devMode.accessTokensetting
Please refer to user object for required types.
Enabling
To enable the dev mode, you have to make sure at least the following settings are set:
session->expirationCheckneeds to be turned off (false)devMode->enabledset totruein theoidcpart of yournuxt.config.ts
Token generation
If needed, the dev mode can generate a valid signed access token if the settting devMode -> generateAccessToken is set to true. This token will be exposed in the user.accessToken property.
The properties on the generated token are
iat(issued at): current DateTime,iss(issuer):devMode.issuersetting, defaultnuxt:oidc:auth:issueraud:devMode.audiencesetting, defaultnuxt:oidc:auth:audiencesub:devMode.subjectsetting, defaultnuxt:oidc:auth:subjectexp: current DateTime + 24h

