Hey team, do any of you have a working example wit...
# ory-selfhosting
s
Hey team, do any of you have a working example with self-hosted OIDC/Google? The links inside this page send me to nowhere (Social sign-in | Ory)
m
Hey have a look here: https://www.ory.sh/docs/kratos/social-signin/google The configuration needed (you can see it under the Ory CLI tab) is this:
Copy code
selfservice:
  methods:
    oidc:
      config:
        providers:
          - id: google # this is `<provider-id>` in the Authorization callback URL. DO NOT CHANGE IT ONCE SET!
            provider: google
            client_id: .... # Replace this with the OAuth2 Client ID
            client_secret: .... # Replace this with the OAuth2 Client secret
            mapper_url: "base64://{YOUR_BASE64_ENCODED_JSONNET_HERE}"
            # Alternatively, use an URL:
            # mapper_url: <https://storage.googleapis.com/abc-cde-prd/9cac9717f007808bf17f22ce7f4295c739604b183f05ac4afb4>
            scope:
              - email
              - profile
            # other supported scopes can be found in Google OAuth 2.0 dev docs
            requested_claims:
              id_token:
                email:
                  essential: true
                email_verified:
                  essential: true
                given_name:
                  essential: true
                family_name: null
                hd: null # If you want the Google Workspace domain
      enabled: true
We could make that clearer in the self-hosted social signin docs. Maybe just an example configuration, there is not that much changing between providers…
s
Nice! Thank you.
That worked, thanks. Do you know by any chance what’s the
ID
text input field that is created? Looks like it is
required
and I have no idea what I changed to make this appear (nor what should i fill it)
Copy code
{
        "type": "input",
        "group": "default",
        "attributes": {
          "name": "identifier",
          "type": "text",
          "value": "",
          "required": true,
          "disabled": false,
          "node_type": "input"
        },
        "messages": [],
        "meta": {
          "label": {
            "id": 1070004,
            "text": "ID",
            "type": "info"
          }
        }
      },
m
ID is probably your identifier, email or username depending on your schema
But not sure what frontend you are using, so hard to say.
s
I was a bit curious since it shows up as "default", not "password" or "oidc" (the two auth methods I have)