Plugs into your favourite Authentication provider (Auth0, Azure Active Directory or AWS Cognito) and exposes GraphQL endpoints for managing it.
It can also serve your Admin UI, or be embedded without your fastify server.
Azure Active Directory setup
AWS Cognito setup
How to use it (standalone mode)
- Make sure you built the UI at least once: run
lerna run buildat root level
- Plug into an Authentication provider (see Configuration section down bellow)
Configure your server through environment variables.
For simpler developement, you can use a
CORS_ORIGIN(boolean): enables the Access-Control-Allow-Origin header. Set to true to let your UI accessing the server when running in dev mode.
BROKENECK_UI(boolean): enables serving Brokeneck UI.
BROKENECK_PROVIDER(auth0|azure|cognito): sets the Authentication provider (required).
BROKENECK_AUTH0_DOMAIN(string): the Auth0 domain to connect to. Please follow the instructions on how to allow your brokeneck server accessing Auth0 Management API.
BROKENECK_AUTH0_CLIENT_ID(string): the Auth0 client ID this server will use.
BROKENECK_AUTH0_CLIENT_SECRET(string): the Auth0 client secret needed for this server to connect.
BROKENECK_AUTH0_CONNECTION(string): the name of the Auth0 connection to use when creating new users.
Username-Password-Authenticationis the name of Auth0 default database created for you.
BROKENECK_AZURE_TENANT_ID(string): the Azure Active Directory Tenant Id. Create a tenant and
BROKENECK_AZURE_CLIENT_ID(string): the Azure Active Directory client ID this server will use. Register an "App" in your tenant to get your client ID.
BROKENECK_AZURE_SECRET(string): the Azure Active Directory secret needed for this server to connect. Go to your "App" secrets to create one, and use it.
BROKENECK_COGNITO_REGION(string): the AWS region hosting your Cognito User Pool.
BROKENECK_COGNITO_USER_POOL_ID(string): the AWS Cognito User Pool ID to create user into.
How to use it (embedded mode)
brokeneck-fastify can be used as a fastify plugin:
How it works
Development should happen on brokeneck-fastify & brokeneck-react packages only.
If you change brokeneck server or UI, rebuild them with the
lerna run build command at top level, and restart the desktop application with