Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Connector's Id token is invalid #6843

Open
4 tasks
shreythakkar11 opened this issue Dec 2, 2024 · 1 comment
Open
4 tasks

bug: Connector's Id token is invalid #6843

shreythakkar11 opened this issue Dec 2, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@shreythakkar11
Copy link

Describe the bug

I wanted to add sign in with linkedin option in the authentication flow. There wasn't a direct option available for linkedin so I used the openid-connect (OIDC) option. I provided the jwks-uri as:

{
  "jwksUri": "https://www.linkedin.com/oauth/openid/jwks"
}

Authorization endpoint: https://www.linkedin.com/oauth/v2/authorization
Token endpoint: https://www.linkedin.com/oauth/v2/accessToken
Scope: openid profile email
Token Endpoint Auth Method: client_secret_post
Sync profile information: Only sync at sign-up

I do get the option of linkedin signin and even I am redirected to its authentication as well. After the authentication is done it redirects me to my sign in page and gives error as: The connector's id token is invalid.

And in the network tab, PATCH /api/interaction/identifiers API gives 401 with error response:

{
    "message": "The connector's id token is invalid.",
    "code": "connector.social_invalid_id_token",
    "data": {
        "issues": [
            {
                "code": "invalid_type",
                "expected": "boolean",
                "received": "string",
                "path": [
                    "email_verified"
                ],
                "message": "Expected boolean, received string"
            }
        ],
        "name": "ZodError"
    },
    "details": "Error in key path \"email_verified\": (invalid_type) Expected boolean but received string."
}

Expected behavior

The sign in through linkedin should be successful with no error alert.

How to reproduce?

Add the linkedin social connector for successful signing in with linkedin.

Context

I am running the logto app in my local system through the docker-compose

  • Logto Cloud
  • Self-hosted, Logto version =
    • Container (Docker image)
    • Raw Node.js

Screenshots

image

@shreythakkar11 shreythakkar11 added the bug Something isn't working label Dec 2, 2024
@xiaoyijun
Copy link
Contributor

Hi @shreythakkar11 , thanks for your feedback.
It seems that the email_verified field data form the Linkedin is a string type, but in the Logto side, it needs a boolean type.
We will have a detailed investigation into this issue. However, you are also welcome to contribute code to help fix it.

@xiaoyijun xiaoyijun self-assigned this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants