GCN-A-1701a00d8c56

GCN-A-1701a00d8c56: Unable to start GoCloudNative.Bff. Invalid Auth0 Domain. Configure the domain in the appsettings.json or program.cs file and try again.

The GoCloudNative BFF is an authentication gateway. As a result, you must configure an identity provider (correctly) for it to start.

To bootstrap the BFF, load the identity provider configuration from the appsettings.json:


//...
var builder = WebApplication.CreateBuilder(args);

var config = builder.Configuration.GetSection("Auth0");

builder.Services.AddSecurityBff(o =>
{
    o.ConfigureAuth0(config);
    
    //...
});

How to reproduce this error

To reproduce the error, the Domain needs to be missing:

  "Auth0": {
    "ClientId": "{yourClientId}",
    "ClientSecret": "{yourClientSecret}",
    "Audience": "{yourAudience}",
    "Scopes": [
      "openid", "profile", "offline_access"
    ]
  },

Or empty

  "Auth0": {
...
    "Domain": "",
...
  },

Or misspelled

  "Auth0": {
...
    "Donain": "{yourDomain}",
...
  },

Or incorrect

  "Auth0": {
...
    "Domain": "https://yourdomain.eu.auth0.com/",
...
  },

Solution

Configure the domain correctly:

  "Auth0": {
...
    "Domain": "example.eu.auth0.com",
...
  },

To find the correct value for domain

  • Go to https://manage.auth0.com
  • Under Applications, in the menu on the left, click Applications
  • Select your application or create one
  • Next, you’ll see the following screen:
  • Copy the Domain-value to appsettings.json