1. Packages
  2. Keycloak Provider
  3. API Docs
  4. oidc
  5. GithubIdentityProvider
Keycloak v6.8.0 published on Saturday, Nov 15, 2025 by Pulumi
keycloak logo
Keycloak v6.8.0 published on Saturday, Nov 15, 2025 by Pulumi

    Allows for creating and managing GitHub-based OIDC Identity Providers within Keycloak.

    OIDC (OpenID Connect) identity providers allows users to authenticate through a third party system using the OIDC standard.

    The GitHub variant is specialized for the public GitHub instance (github.com) or GitHub Enterprise deployments.

    For example, it will obtain automatically the primary email from the logged in account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as keycloak from "@pulumi/keycloak";
    
    const realm = new keycloak.Realm("realm", {
        realm: "my-realm",
        enabled: true,
    });
    const github = new keycloak.oidc.GithubIdentityProvider("github", {
        realm: realm.id,
        clientId: githubIdentityProviderClientId,
        clientSecret: githubIdentityProviderClientSecret,
        trustEmail: true,
        syncMode: "IMPORT",
        extraConfig: {
            myCustomConfigKey: "myValue",
        },
    });
    
    import pulumi
    import pulumi_keycloak as keycloak
    
    realm = keycloak.Realm("realm",
        realm="my-realm",
        enabled=True)
    github = keycloak.oidc.GithubIdentityProvider("github",
        realm=realm.id,
        client_id=github_identity_provider_client_id,
        client_secret=github_identity_provider_client_secret,
        trust_email=True,
        sync_mode="IMPORT",
        extra_config={
            "myCustomConfigKey": "myValue",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-keycloak/sdk/v6/go/keycloak"
    	"github.com/pulumi/pulumi-keycloak/sdk/v6/go/keycloak/oidc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		realm, err := keycloak.NewRealm(ctx, "realm", &keycloak.RealmArgs{
    			Realm:   pulumi.String("my-realm"),
    			Enabled: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oidc.NewGithubIdentityProvider(ctx, "github", &oidc.GithubIdentityProviderArgs{
    			Realm:        realm.ID(),
    			ClientId:     pulumi.Any(githubIdentityProviderClientId),
    			ClientSecret: pulumi.Any(githubIdentityProviderClientSecret),
    			TrustEmail:   pulumi.Bool(true),
    			SyncMode:     pulumi.String("IMPORT"),
    			ExtraConfig: pulumi.StringMap{
    				"myCustomConfigKey": pulumi.String("myValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Keycloak = Pulumi.Keycloak;
    
    return await Deployment.RunAsync(() => 
    {
        var realm = new Keycloak.Realm("realm", new()
        {
            RealmName = "my-realm",
            Enabled = true,
        });
    
        var github = new Keycloak.Oidc.GithubIdentityProvider("github", new()
        {
            Realm = realm.Id,
            ClientId = githubIdentityProviderClientId,
            ClientSecret = githubIdentityProviderClientSecret,
            TrustEmail = true,
            SyncMode = "IMPORT",
            ExtraConfig = 
            {
                { "myCustomConfigKey", "myValue" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.keycloak.Realm;
    import com.pulumi.keycloak.RealmArgs;
    import com.pulumi.keycloak.oidc.GithubIdentityProvider;
    import com.pulumi.keycloak.oidc.GithubIdentityProviderArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var realm = new Realm("realm", RealmArgs.builder()
                .realm("my-realm")
                .enabled(true)
                .build());
    
            var github = new GithubIdentityProvider("github", GithubIdentityProviderArgs.builder()
                .realm(realm.id())
                .clientId(githubIdentityProviderClientId)
                .clientSecret(githubIdentityProviderClientSecret)
                .trustEmail(true)
                .syncMode("IMPORT")
                .extraConfig(Map.of("myCustomConfigKey", "myValue"))
                .build());
    
        }
    }
    
    resources:
      realm:
        type: keycloak:Realm
        properties:
          realm: my-realm
          enabled: true
      github:
        type: keycloak:oidc:GithubIdentityProvider
        properties:
          realm: ${realm.id}
          clientId: ${githubIdentityProviderClientId}
          clientSecret: ${githubIdentityProviderClientSecret}
          trustEmail: true
          syncMode: IMPORT
          extraConfig:
            myCustomConfigKey: myValue
    

    Create GithubIdentityProvider Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GithubIdentityProvider(name: string, args: GithubIdentityProviderArgs, opts?: CustomResourceOptions);
    @overload
    def GithubIdentityProvider(resource_name: str,
                               args: GithubIdentityProviderArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def GithubIdentityProvider(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               client_id: Optional[str] = None,
                               realm: Optional[str] = None,
                               client_secret: Optional[str] = None,
                               github_json_format: Optional[bool] = None,
                               hide_on_login_page: Optional[bool] = None,
                               authenticate_by_default: Optional[bool] = None,
                               api_url: Optional[str] = None,
                               default_scopes: Optional[str] = None,
                               display_name: Optional[str] = None,
                               enabled: Optional[bool] = None,
                               extra_config: Optional[Mapping[str, str]] = None,
                               first_broker_login_flow_alias: Optional[str] = None,
                               add_read_token_role_on_create: Optional[bool] = None,
                               gui_order: Optional[str] = None,
                               base_url: Optional[str] = None,
                               link_only: Optional[bool] = None,
                               org_domain: Optional[str] = None,
                               org_redirect_mode_email_matches: Optional[bool] = None,
                               organization_id: Optional[str] = None,
                               post_broker_login_flow_alias: Optional[str] = None,
                               provider_id: Optional[str] = None,
                               alias: Optional[str] = None,
                               store_token: Optional[bool] = None,
                               sync_mode: Optional[str] = None,
                               trust_email: Optional[bool] = None)
    func NewGithubIdentityProvider(ctx *Context, name string, args GithubIdentityProviderArgs, opts ...ResourceOption) (*GithubIdentityProvider, error)
    public GithubIdentityProvider(string name, GithubIdentityProviderArgs args, CustomResourceOptions? opts = null)
    public GithubIdentityProvider(String name, GithubIdentityProviderArgs args)
    public GithubIdentityProvider(String name, GithubIdentityProviderArgs args, CustomResourceOptions options)
    
    type: keycloak:oidc:GithubIdentityProvider
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args GithubIdentityProviderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args GithubIdentityProviderArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args GithubIdentityProviderArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GithubIdentityProviderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GithubIdentityProviderArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var githubIdentityProviderResource = new Keycloak.Oidc.GithubIdentityProvider("githubIdentityProviderResource", new()
    {
        ClientId = "string",
        Realm = "string",
        ClientSecret = "string",
        GithubJsonFormat = false,
        HideOnLoginPage = false,
        AuthenticateByDefault = false,
        ApiUrl = "string",
        DefaultScopes = "string",
        DisplayName = "string",
        Enabled = false,
        ExtraConfig = 
        {
            { "string", "string" },
        },
        FirstBrokerLoginFlowAlias = "string",
        AddReadTokenRoleOnCreate = false,
        GuiOrder = "string",
        BaseUrl = "string",
        LinkOnly = false,
        OrgDomain = "string",
        OrgRedirectModeEmailMatches = false,
        OrganizationId = "string",
        PostBrokerLoginFlowAlias = "string",
        ProviderId = "string",
        Alias = "string",
        StoreToken = false,
        SyncMode = "string",
        TrustEmail = false,
    });
    
    example, err := oidc.NewGithubIdentityProvider(ctx, "githubIdentityProviderResource", &oidc.GithubIdentityProviderArgs{
    	ClientId:              pulumi.String("string"),
    	Realm:                 pulumi.String("string"),
    	ClientSecret:          pulumi.String("string"),
    	GithubJsonFormat:      pulumi.Bool(false),
    	HideOnLoginPage:       pulumi.Bool(false),
    	AuthenticateByDefault: pulumi.Bool(false),
    	ApiUrl:                pulumi.String("string"),
    	DefaultScopes:         pulumi.String("string"),
    	DisplayName:           pulumi.String("string"),
    	Enabled:               pulumi.Bool(false),
    	ExtraConfig: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	FirstBrokerLoginFlowAlias:   pulumi.String("string"),
    	AddReadTokenRoleOnCreate:    pulumi.Bool(false),
    	GuiOrder:                    pulumi.String("string"),
    	BaseUrl:                     pulumi.String("string"),
    	LinkOnly:                    pulumi.Bool(false),
    	OrgDomain:                   pulumi.String("string"),
    	OrgRedirectModeEmailMatches: pulumi.Bool(false),
    	OrganizationId:              pulumi.String("string"),
    	PostBrokerLoginFlowAlias:    pulumi.String("string"),
    	ProviderId:                  pulumi.String("string"),
    	Alias:                       pulumi.String("string"),
    	StoreToken:                  pulumi.Bool(false),
    	SyncMode:                    pulumi.String("string"),
    	TrustEmail:                  pulumi.Bool(false),
    })
    
    var githubIdentityProviderResource = new GithubIdentityProvider("githubIdentityProviderResource", GithubIdentityProviderArgs.builder()
        .clientId("string")
        .realm("string")
        .clientSecret("string")
        .githubJsonFormat(false)
        .hideOnLoginPage(false)
        .authenticateByDefault(false)
        .apiUrl("string")
        .defaultScopes("string")
        .displayName("string")
        .enabled(false)
        .extraConfig(Map.of("string", "string"))
        .firstBrokerLoginFlowAlias("string")
        .addReadTokenRoleOnCreate(false)
        .guiOrder("string")
        .baseUrl("string")
        .linkOnly(false)
        .orgDomain("string")
        .orgRedirectModeEmailMatches(false)
        .organizationId("string")
        .postBrokerLoginFlowAlias("string")
        .providerId("string")
        .alias("string")
        .storeToken(false)
        .syncMode("string")
        .trustEmail(false)
        .build());
    
    github_identity_provider_resource = keycloak.oidc.GithubIdentityProvider("githubIdentityProviderResource",
        client_id="string",
        realm="string",
        client_secret="string",
        github_json_format=False,
        hide_on_login_page=False,
        authenticate_by_default=False,
        api_url="string",
        default_scopes="string",
        display_name="string",
        enabled=False,
        extra_config={
            "string": "string",
        },
        first_broker_login_flow_alias="string",
        add_read_token_role_on_create=False,
        gui_order="string",
        base_url="string",
        link_only=False,
        org_domain="string",
        org_redirect_mode_email_matches=False,
        organization_id="string",
        post_broker_login_flow_alias="string",
        provider_id="string",
        alias="string",
        store_token=False,
        sync_mode="string",
        trust_email=False)
    
    const githubIdentityProviderResource = new keycloak.oidc.GithubIdentityProvider("githubIdentityProviderResource", {
        clientId: "string",
        realm: "string",
        clientSecret: "string",
        githubJsonFormat: false,
        hideOnLoginPage: false,
        authenticateByDefault: false,
        apiUrl: "string",
        defaultScopes: "string",
        displayName: "string",
        enabled: false,
        extraConfig: {
            string: "string",
        },
        firstBrokerLoginFlowAlias: "string",
        addReadTokenRoleOnCreate: false,
        guiOrder: "string",
        baseUrl: "string",
        linkOnly: false,
        orgDomain: "string",
        orgRedirectModeEmailMatches: false,
        organizationId: "string",
        postBrokerLoginFlowAlias: "string",
        providerId: "string",
        alias: "string",
        storeToken: false,
        syncMode: "string",
        trustEmail: false,
    });
    
    type: keycloak:oidc:GithubIdentityProvider
    properties:
        addReadTokenRoleOnCreate: false
        alias: string
        apiUrl: string
        authenticateByDefault: false
        baseUrl: string
        clientId: string
        clientSecret: string
        defaultScopes: string
        displayName: string
        enabled: false
        extraConfig:
            string: string
        firstBrokerLoginFlowAlias: string
        githubJsonFormat: false
        guiOrder: string
        hideOnLoginPage: false
        linkOnly: false
        orgDomain: string
        orgRedirectModeEmailMatches: false
        organizationId: string
        postBrokerLoginFlowAlias: string
        providerId: string
        realm: string
        storeToken: false
        syncMode: string
        trustEmail: false
    

    GithubIdentityProvider Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The GithubIdentityProvider resource accepts the following input properties:

    ClientId string
    The client or client identifier registered within the identity provider.
    ClientSecret string
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    Realm string
    The name of the realm. This is unique across Keycloak.
    AddReadTokenRoleOnCreate bool
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    Alias string
    The alias for the GitHub identity provider.
    ApiUrl string
    The GitHub API URL, defaults to https://api.github.com.
    AuthenticateByDefault bool
    Enable/disable authenticate users by default.
    BaseUrl string
    The GitHub base URL, defaults to https://github.com
    DefaultScopes string
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    DisplayName string
    Display name for the GitHub identity provider in the GUI.
    Enabled bool
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    ExtraConfig Dictionary<string, string>
    FirstBrokerLoginFlowAlias string
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    GithubJsonFormat bool
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    GuiOrder string
    A number defining the order of this identity provider in the GUI.
    HideOnLoginPage bool
    When true, this identity provider will be hidden on the login page. Defaults to false.
    LinkOnly bool
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    OrgDomain string
    OrgRedirectModeEmailMatches bool
    OrganizationId string
    ID of organization with which this identity is linked.
    PostBrokerLoginFlowAlias string
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    ProviderId string
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    StoreToken bool
    When true, tokens will be stored after authenticating users. Defaults to true.
    SyncMode string
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    TrustEmail bool
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.
    ClientId string
    The client or client identifier registered within the identity provider.
    ClientSecret string
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    Realm string
    The name of the realm. This is unique across Keycloak.
    AddReadTokenRoleOnCreate bool
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    Alias string
    The alias for the GitHub identity provider.
    ApiUrl string
    The GitHub API URL, defaults to https://api.github.com.
    AuthenticateByDefault bool
    Enable/disable authenticate users by default.
    BaseUrl string
    The GitHub base URL, defaults to https://github.com
    DefaultScopes string
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    DisplayName string
    Display name for the GitHub identity provider in the GUI.
    Enabled bool
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    ExtraConfig map[string]string
    FirstBrokerLoginFlowAlias string
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    GithubJsonFormat bool
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    GuiOrder string
    A number defining the order of this identity provider in the GUI.
    HideOnLoginPage bool
    When true, this identity provider will be hidden on the login page. Defaults to false.
    LinkOnly bool
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    OrgDomain string
    OrgRedirectModeEmailMatches bool
    OrganizationId string
    ID of organization with which this identity is linked.
    PostBrokerLoginFlowAlias string
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    ProviderId string
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    StoreToken bool
    When true, tokens will be stored after authenticating users. Defaults to true.
    SyncMode string
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    TrustEmail bool
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.
    clientId String
    The client or client identifier registered within the identity provider.
    clientSecret String
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    realm String
    The name of the realm. This is unique across Keycloak.
    addReadTokenRoleOnCreate Boolean
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    alias String
    The alias for the GitHub identity provider.
    apiUrl String
    The GitHub API URL, defaults to https://api.github.com.
    authenticateByDefault Boolean
    Enable/disable authenticate users by default.
    baseUrl String
    The GitHub base URL, defaults to https://github.com
    defaultScopes String
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    displayName String
    Display name for the GitHub identity provider in the GUI.
    enabled Boolean
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    extraConfig Map<String,String>
    firstBrokerLoginFlowAlias String
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    githubJsonFormat Boolean
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    guiOrder String
    A number defining the order of this identity provider in the GUI.
    hideOnLoginPage Boolean
    When true, this identity provider will be hidden on the login page. Defaults to false.
    linkOnly Boolean
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    orgDomain String
    orgRedirectModeEmailMatches Boolean
    organizationId String
    ID of organization with which this identity is linked.
    postBrokerLoginFlowAlias String
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    providerId String
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    storeToken Boolean
    When true, tokens will be stored after authenticating users. Defaults to true.
    syncMode String
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    trustEmail Boolean
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.
    clientId string
    The client or client identifier registered within the identity provider.
    clientSecret string
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    realm string
    The name of the realm. This is unique across Keycloak.
    addReadTokenRoleOnCreate boolean
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    alias string
    The alias for the GitHub identity provider.
    apiUrl string
    The GitHub API URL, defaults to https://api.github.com.
    authenticateByDefault boolean
    Enable/disable authenticate users by default.
    baseUrl string
    The GitHub base URL, defaults to https://github.com
    defaultScopes string
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    displayName string
    Display name for the GitHub identity provider in the GUI.
    enabled boolean
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    extraConfig {[key: string]: string}
    firstBrokerLoginFlowAlias string
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    githubJsonFormat boolean
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    guiOrder string
    A number defining the order of this identity provider in the GUI.
    hideOnLoginPage boolean
    When true, this identity provider will be hidden on the login page. Defaults to false.
    linkOnly boolean
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    orgDomain string
    orgRedirectModeEmailMatches boolean
    organizationId string
    ID of organization with which this identity is linked.
    postBrokerLoginFlowAlias string
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    providerId string
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    storeToken boolean
    When true, tokens will be stored after authenticating users. Defaults to true.
    syncMode string
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    trustEmail boolean
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.
    client_id str
    The client or client identifier registered within the identity provider.
    client_secret str
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    realm str
    The name of the realm. This is unique across Keycloak.
    add_read_token_role_on_create bool
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    alias str
    The alias for the GitHub identity provider.
    api_url str
    The GitHub API URL, defaults to https://api.github.com.
    authenticate_by_default bool
    Enable/disable authenticate users by default.
    base_url str
    The GitHub base URL, defaults to https://github.com
    default_scopes str
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    display_name str
    Display name for the GitHub identity provider in the GUI.
    enabled bool
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    extra_config Mapping[str, str]
    first_broker_login_flow_alias str
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    github_json_format bool
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    gui_order str
    A number defining the order of this identity provider in the GUI.
    hide_on_login_page bool
    When true, this identity provider will be hidden on the login page. Defaults to false.
    link_only bool
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    org_domain str
    org_redirect_mode_email_matches bool
    organization_id str
    ID of organization with which this identity is linked.
    post_broker_login_flow_alias str
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    provider_id str
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    store_token bool
    When true, tokens will be stored after authenticating users. Defaults to true.
    sync_mode str
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    trust_email bool
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.
    clientId String
    The client or client identifier registered within the identity provider.
    clientSecret String
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    realm String
    The name of the realm. This is unique across Keycloak.
    addReadTokenRoleOnCreate Boolean
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    alias String
    The alias for the GitHub identity provider.
    apiUrl String
    The GitHub API URL, defaults to https://api.github.com.
    authenticateByDefault Boolean
    Enable/disable authenticate users by default.
    baseUrl String
    The GitHub base URL, defaults to https://github.com
    defaultScopes String
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    displayName String
    Display name for the GitHub identity provider in the GUI.
    enabled Boolean
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    extraConfig Map<String>
    firstBrokerLoginFlowAlias String
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    githubJsonFormat Boolean
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    guiOrder String
    A number defining the order of this identity provider in the GUI.
    hideOnLoginPage Boolean
    When true, this identity provider will be hidden on the login page. Defaults to false.
    linkOnly Boolean
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    orgDomain String
    orgRedirectModeEmailMatches Boolean
    organizationId String
    ID of organization with which this identity is linked.
    postBrokerLoginFlowAlias String
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    providerId String
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    storeToken Boolean
    When true, tokens will be stored after authenticating users. Defaults to true.
    syncMode String
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    trustEmail Boolean
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GithubIdentityProvider resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    InternalId string
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
    Id string
    The provider-assigned unique ID for this managed resource.
    InternalId string
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
    id String
    The provider-assigned unique ID for this managed resource.
    internalId String
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
    id string
    The provider-assigned unique ID for this managed resource.
    internalId string
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
    id str
    The provider-assigned unique ID for this managed resource.
    internal_id str
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
    id String
    The provider-assigned unique ID for this managed resource.
    internalId String
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.

    Look up Existing GithubIdentityProvider Resource

    Get an existing GithubIdentityProvider resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: GithubIdentityProviderState, opts?: CustomResourceOptions): GithubIdentityProvider
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            add_read_token_role_on_create: Optional[bool] = None,
            alias: Optional[str] = None,
            api_url: Optional[str] = None,
            authenticate_by_default: Optional[bool] = None,
            base_url: Optional[str] = None,
            client_id: Optional[str] = None,
            client_secret: Optional[str] = None,
            default_scopes: Optional[str] = None,
            display_name: Optional[str] = None,
            enabled: Optional[bool] = None,
            extra_config: Optional[Mapping[str, str]] = None,
            first_broker_login_flow_alias: Optional[str] = None,
            github_json_format: Optional[bool] = None,
            gui_order: Optional[str] = None,
            hide_on_login_page: Optional[bool] = None,
            internal_id: Optional[str] = None,
            link_only: Optional[bool] = None,
            org_domain: Optional[str] = None,
            org_redirect_mode_email_matches: Optional[bool] = None,
            organization_id: Optional[str] = None,
            post_broker_login_flow_alias: Optional[str] = None,
            provider_id: Optional[str] = None,
            realm: Optional[str] = None,
            store_token: Optional[bool] = None,
            sync_mode: Optional[str] = None,
            trust_email: Optional[bool] = None) -> GithubIdentityProvider
    func GetGithubIdentityProvider(ctx *Context, name string, id IDInput, state *GithubIdentityProviderState, opts ...ResourceOption) (*GithubIdentityProvider, error)
    public static GithubIdentityProvider Get(string name, Input<string> id, GithubIdentityProviderState? state, CustomResourceOptions? opts = null)
    public static GithubIdentityProvider get(String name, Output<String> id, GithubIdentityProviderState state, CustomResourceOptions options)
    resources:  _:    type: keycloak:oidc:GithubIdentityProvider    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AddReadTokenRoleOnCreate bool
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    Alias string
    The alias for the GitHub identity provider.
    ApiUrl string
    The GitHub API URL, defaults to https://api.github.com.
    AuthenticateByDefault bool
    Enable/disable authenticate users by default.
    BaseUrl string
    The GitHub base URL, defaults to https://github.com
    ClientId string
    The client or client identifier registered within the identity provider.
    ClientSecret string
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    DefaultScopes string
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    DisplayName string
    Display name for the GitHub identity provider in the GUI.
    Enabled bool
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    ExtraConfig Dictionary<string, string>
    FirstBrokerLoginFlowAlias string
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    GithubJsonFormat bool
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    GuiOrder string
    A number defining the order of this identity provider in the GUI.
    HideOnLoginPage bool
    When true, this identity provider will be hidden on the login page. Defaults to false.
    InternalId string
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
    LinkOnly bool
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    OrgDomain string
    OrgRedirectModeEmailMatches bool
    OrganizationId string
    ID of organization with which this identity is linked.
    PostBrokerLoginFlowAlias string
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    ProviderId string
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    Realm string
    The name of the realm. This is unique across Keycloak.
    StoreToken bool
    When true, tokens will be stored after authenticating users. Defaults to true.
    SyncMode string
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    TrustEmail bool
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.
    AddReadTokenRoleOnCreate bool
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    Alias string
    The alias for the GitHub identity provider.
    ApiUrl string
    The GitHub API URL, defaults to https://api.github.com.
    AuthenticateByDefault bool
    Enable/disable authenticate users by default.
    BaseUrl string
    The GitHub base URL, defaults to https://github.com
    ClientId string
    The client or client identifier registered within the identity provider.
    ClientSecret string
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    DefaultScopes string
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    DisplayName string
    Display name for the GitHub identity provider in the GUI.
    Enabled bool
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    ExtraConfig map[string]string
    FirstBrokerLoginFlowAlias string
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    GithubJsonFormat bool
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    GuiOrder string
    A number defining the order of this identity provider in the GUI.
    HideOnLoginPage bool
    When true, this identity provider will be hidden on the login page. Defaults to false.
    InternalId string
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
    LinkOnly bool
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    OrgDomain string
    OrgRedirectModeEmailMatches bool
    OrganizationId string
    ID of organization with which this identity is linked.
    PostBrokerLoginFlowAlias string
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    ProviderId string
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    Realm string
    The name of the realm. This is unique across Keycloak.
    StoreToken bool
    When true, tokens will be stored after authenticating users. Defaults to true.
    SyncMode string
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    TrustEmail bool
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.
    addReadTokenRoleOnCreate Boolean
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    alias String
    The alias for the GitHub identity provider.
    apiUrl String
    The GitHub API URL, defaults to https://api.github.com.
    authenticateByDefault Boolean
    Enable/disable authenticate users by default.
    baseUrl String
    The GitHub base URL, defaults to https://github.com
    clientId String
    The client or client identifier registered within the identity provider.
    clientSecret String
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    defaultScopes String
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    displayName String
    Display name for the GitHub identity provider in the GUI.
    enabled Boolean
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    extraConfig Map<String,String>
    firstBrokerLoginFlowAlias String
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    githubJsonFormat Boolean
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    guiOrder String
    A number defining the order of this identity provider in the GUI.
    hideOnLoginPage Boolean
    When true, this identity provider will be hidden on the login page. Defaults to false.
    internalId String
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
    linkOnly Boolean
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    orgDomain String
    orgRedirectModeEmailMatches Boolean
    organizationId String
    ID of organization with which this identity is linked.
    postBrokerLoginFlowAlias String
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    providerId String
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    realm String
    The name of the realm. This is unique across Keycloak.
    storeToken Boolean
    When true, tokens will be stored after authenticating users. Defaults to true.
    syncMode String
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    trustEmail Boolean
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.
    addReadTokenRoleOnCreate boolean
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    alias string
    The alias for the GitHub identity provider.
    apiUrl string
    The GitHub API URL, defaults to https://api.github.com.
    authenticateByDefault boolean
    Enable/disable authenticate users by default.
    baseUrl string
    The GitHub base URL, defaults to https://github.com
    clientId string
    The client or client identifier registered within the identity provider.
    clientSecret string
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    defaultScopes string
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    displayName string
    Display name for the GitHub identity provider in the GUI.
    enabled boolean
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    extraConfig {[key: string]: string}
    firstBrokerLoginFlowAlias string
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    githubJsonFormat boolean
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    guiOrder string
    A number defining the order of this identity provider in the GUI.
    hideOnLoginPage boolean
    When true, this identity provider will be hidden on the login page. Defaults to false.
    internalId string
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
    linkOnly boolean
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    orgDomain string
    orgRedirectModeEmailMatches boolean
    organizationId string
    ID of organization with which this identity is linked.
    postBrokerLoginFlowAlias string
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    providerId string
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    realm string
    The name of the realm. This is unique across Keycloak.
    storeToken boolean
    When true, tokens will be stored after authenticating users. Defaults to true.
    syncMode string
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    trustEmail boolean
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.
    add_read_token_role_on_create bool
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    alias str
    The alias for the GitHub identity provider.
    api_url str
    The GitHub API URL, defaults to https://api.github.com.
    authenticate_by_default bool
    Enable/disable authenticate users by default.
    base_url str
    The GitHub base URL, defaults to https://github.com
    client_id str
    The client or client identifier registered within the identity provider.
    client_secret str
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    default_scopes str
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    display_name str
    Display name for the GitHub identity provider in the GUI.
    enabled bool
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    extra_config Mapping[str, str]
    first_broker_login_flow_alias str
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    github_json_format bool
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    gui_order str
    A number defining the order of this identity provider in the GUI.
    hide_on_login_page bool
    When true, this identity provider will be hidden on the login page. Defaults to false.
    internal_id str
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
    link_only bool
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    org_domain str
    org_redirect_mode_email_matches bool
    organization_id str
    ID of organization with which this identity is linked.
    post_broker_login_flow_alias str
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    provider_id str
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    realm str
    The name of the realm. This is unique across Keycloak.
    store_token bool
    When true, tokens will be stored after authenticating users. Defaults to true.
    sync_mode str
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    trust_email bool
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.
    addReadTokenRoleOnCreate Boolean
    When true, new users will be able to read stored tokens. This will automatically assign the broker.read-token role. Defaults to false.
    alias String
    The alias for the GitHub identity provider.
    apiUrl String
    The GitHub API URL, defaults to https://api.github.com.
    authenticateByDefault Boolean
    Enable/disable authenticate users by default.
    baseUrl String
    The GitHub base URL, defaults to https://github.com
    clientId String
    The client or client identifier registered within the identity provider.
    clientSecret String
    The client or client secret registered within the identity provider. This field is able to obtain its value from vault, use $${vault.ID} format.
    defaultScopes String
    The scopes to be sent when asking for authorization. It can be a space-separated list of scopes. Defaults to user:email.
    displayName String
    Display name for the GitHub identity provider in the GUI.
    enabled Boolean
    When true, users will be able to log in to this realm using this identity provider. Defaults to true.
    extraConfig Map<String>
    firstBrokerLoginFlowAlias String
    The authentication flow to use when users log in for the first time through this identity provider. Defaults to first broker login.
    githubJsonFormat Boolean
    When true, GitHub API is told explicitly to accept JSON during token authentication requests. Defaults to false.
    guiOrder String
    A number defining the order of this identity provider in the GUI.
    hideOnLoginPage Boolean
    When true, this identity provider will be hidden on the login page. Defaults to false.
    internalId String
    (Computed) The unique ID that Keycloak assigns to the identity provider upon creation.
    linkOnly Boolean
    When true, users cannot sign-in using this provider, but their existing accounts will be linked when possible. Defaults to false.
    orgDomain String
    orgRedirectModeEmailMatches Boolean
    organizationId String
    ID of organization with which this identity is linked.
    postBrokerLoginFlowAlias String
    The authentication flow to use after users have successfully logged in, which can be used to perform additional user verification (such as OTP checking). Defaults to an empty string, which means no post login flow will be used.
    providerId String
    The ID of the identity provider to use. Defaults to github, which should be used unless you have extended Keycloak and provided your own implementation.
    realm String
    The name of the realm. This is unique across Keycloak.
    storeToken Boolean
    When true, tokens will be stored after authenticating users. Defaults to true.
    syncMode String
    The default sync mode to use for all mappers attached to this identity provider. Can be once of IMPORT, FORCE, or LEGACY.
    trustEmail Boolean
    When true, email addresses for users in this provider will automatically be verified regardless of the realm's email verification policy. Defaults to false.

    Import

    GitHub Identity providers can be imported using the format {{realm_id}}/{{idp_alias}}, where idp_alias is the identity provider alias.

    Example:

    bash

    $ pulumi import keycloak:oidc/githubIdentityProvider:GithubIdentityProvider github_identity_provider my-realm/my-github-idp
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Keycloak pulumi/pulumi-keycloak
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the keycloak Terraform Provider.
    keycloak logo
    Keycloak v6.8.0 published on Saturday, Nov 15, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate