goth icon indicating copy to clipboard operation
goth copied to clipboard

Empty claims with OIDC provider on Authentik

Open tboerger opened this issue 1 year ago • 1 comments

I try to implement Goth with generic OIDC providers like Authentik. The configurations for GitHub, AzureAD and Keycloak are working totally finbe, but with Authentik and the configuration below results in empty claims as I don't get a nickname, email or name of the authenticated user.

Has somebody else faced this issue and got an idea how to resolve that? If there is some information missing I try my best to deliver the missing parts.

	provider, err := openidConnect.NewNamed(
		"authentik",
		"REDACTED",
		"REDACTED",
		"http://localhost:8080/api/v1/auth/authentik-oidc/callback",
		"https://authentik.example.com/application/o/example/.well-known/openid-configuration",
		[]string{},
	)

	if err != nil {
		return nil, err
	}

	provider.NickNameClaims = []string{
		"preferred_username",
	}

	provider.NameClaims = []string{
		"name",
	}

	provider.EmailClaims = []string{
		"email",
	}

tboerger avatar May 31 '24 08:05 tboerger

I have also tried it with the discovery URL set to https://authentik.example.com/application/o/example/ which got the same result.

tboerger avatar May 31 '24 08:05 tboerger