Hey hey Is it possible to add external identity p...
# talk-kratos
l
Hey hey Is it possible to add external identity providers for open source version of kratos? I just found instruction about how to add openid provider using ory console (https://www.ory.sh/docs/kratos/social-signin/generic) But I can't find any API for doing it in open source version Thanks in advance
m
Hello Dmitrii, the process to add them is the same when self-hosting. You add the configuration to kratos and add a jsonnet snippet to map the data e.g. for github:
Copy code
selfservice:
  methods:
    oidc:
      config:
        providers:
          - id: github # this is `<provider-id>` in the Authorization callback URL. DO NOT CHANGE IT ONCE SET!
            provider: github # This defines the app type used for integration. Use 'github' for GitHub OAuth app. Use 'github-app' for GitHub App.
            client_id: .... # Replace this with the OAuth2 Client ID provided by GitHub
            client_secret: .... # Replace this with the OAuth2 Client Secret provided by GitHub
            mapper_url: "base64://<YOUR_BASE64_ENCODED_JSONNET_HERE>"
            # Alternatively, use an URL:
            # mapper_url: <https://storage.googleapis.com/abc-cde-prd/9cac9717f007808bf17f22ce7f4295c739604b183f05ac4afb4>
            scope:
              - user:email
      enabled: true
there is some documentation for each individual provider for self-hosted as well: https://www.ory.sh/docs/kratos/social-signin/github#configuration-for-self-hosted-instances
s
there is no api for that, but you configure it in the config https://www.ory.sh/docs/kratos/reference/configuration
l
Yes Thank you very much!
It would be convenient to see that information for https://www.ory.sh/docs/kratos/social-signin/generic provider
m
you mean a section for self-hosted in generic? with the above config sample changed a bit for generic?