great-laptop-90610
07/11/2024, 1:11 PMchilly-king-10285
07/11/2024, 1:11 PMchilly-king-10285
07/11/2024, 1:11 PMkratos.yml
configuration file under the selfservice
and methods
sections. Here's an example of how you can do it: yaml 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
In this configuration, you need to replace ....
with your GitHub OAuth2 Client ID and Client Secret. The mapper_url
should be replaced with your Base64 encoded Jsonnet or an URL to the file. The scope
section defines the OAuth scopes Ory requests from GitHub. In this case, it's set to user:email
for a basic setup. For more information, you can refer to the [Ory Kratos GitHub Social Sign-in documentation](https://www.ory.sh/docs/kratos/social-signin/github#data-mapping).