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

Social Account Linking #3851

Open
4 of 5 tasks
MUzairS15 opened this issue Mar 25, 2024 · 0 comments
Open
4 of 5 tasks

Social Account Linking #3851

MUzairS15 opened this issue Mar 25, 2024 · 0 comments
Labels
bug Something is not working.

Comments

@MUzairS15
Copy link

Preflight checklist

Ory Network Project

No response

Describe the bug

I am trying out Automatic social account linking flow, while I am able to complete the flow, there are few nuances during the flow.

  1. I already have a Kratos Identity (Username password).
  2. On the login screen I initiate Sign in with GitHub (which has the same email address as used while creating the Kratos Identity)
  3. After GitHub OAuth I get redirected to my Login page to enter my email and password.
    Bug 1: In the docs, it's mentioned I only need to enter my password, but I am asked to enter email address again.
    Bug 2: The message that get's displayed Signing in will link your account to \"<abc@gmail.com>\" at provider \"\". If you do not wish to link that account, please start a new login flow, it is missing the provider value. (Refer the JSON flow as recieved from the Kratos to render the login form).
    Bug 3: Why there's button for Sign in with github and link credential, when I initiated the flow by clicking on the Sign in with Github? Also clikcing on these buttons re-initiate the flow.
{
    "created_at": "2024-03-25T17:44:32.334498Z",
    "expires_at": "2024-03-26T05:44:32.333298Z",
    "id": "1c57ad4f-b4c6-4ac6-9895-8b2aa55d6fdb",
    "issued_at": "2024-03-25T17:44:32.333298Z",
    "refresh": false,
    "request_url": "http://localhost:9010/self-service/methods/oidc/callback/github?code=1f3e119fd0758607b6de\u0026return_to=%2Flogin%3Flogin_challenge%3D472c4458f7ef4f068a8400f038f8a13c\u0026state=Nzg3YjM4MzUtZDIxYS00MzkwLTgxNjMtZTZmMjQwMjNlY2ZkOnhkqGSXoE5LtbWcKnv7DcE",
    "requested_aal": "aal1",
    "return_to": "/login?login_challenge=472c4458f7ef4f068a8400f038f8a13c",
    "type": "browser",
    "ui": {
        "action": "http://localhost:9010/self-service/login?flow=1c57ad4f-b4c6-4ac6-9895-8b2aa55d6fdb",
        "messages": [
            {
                "id": 4000007,
                "text": "An account with the same identifier (email, phone, username, ...) exists already.",
                "type": "error"
            },
            {
                "context": {
                    "duplicateIdentifier": "abc@gmail.com",
                    "newLoginUrl": "http://localhost:9876/login",
                    "provider": ""
                },
                "id": 1010016,
                "text": "Signing in will link your account to \"abc@gmail.com\" at provider \"\". If you do not wish to link that account, please start a new login flow.",
                "type": "info"
            }
        ],
        "method": "POST",
        "nodes": [
            {
                "attributes": {
                    "disabled": false,
                    "name": "provider",
                    "node_type": "input",
                    "type": "submit",
                    "value": "github"
                },
                "group": "oidc",
                "messages": [],
                "meta": {
                    "label": {
                        "context": {
                            "provider": "github"
                        },
                        "id": 1010018,
                        "text": "Sign in with github and link credential",
                        "type": "info"
                    }
                },
                "type": "input"
            },
            {
                "attributes": {
                    "disabled": false,
                    "name": "provider",
                    "node_type": "input",
                    "type": "submit",
                    "value": "google"
                },
                "group": "oidc",
                "messages": [],
                "meta": {
                    "label": {
                        "context": {
                            "provider": "google"
                        },
                        "id": 1010018,
                        "text": "Sign in with google and link credential",
                        "type": "info"
                    }
                },
                "type": "input"
            },
            {
                "attributes": {
                    "disabled": false,
                    "name": "csrf_token",
                    "node_type": "input",
                    "required": true,
                    "type": "hidden",
                    "value": "QFaCQuMHPMYDwrD1HjzPFOxePFGbrg9OQZqD4ioVJwcXrdkWBopdmUoty4UvOD67U96NDfUC0qDZ9dRn6dUM6g=="
                },
                "group": "default",
                "messages": [],
                "meta": {},
                "type": "input"
            },
            {
                "attributes": {
                    "disabled": false,
                    "name": "identifier",
                    "node_type": "input",
                    "required": true,
                    "type": "text",
                    "value": ""
                },
                "group": "default",
                "messages": [],
                "meta": {
                    "label": {
                        "context": {
                            "title": "E-Mail"
                        },
                        "id": 1070002,
                        "text": "E-Mail",
                        "type": "info"
                    }
                },
                "type": "input"
            },
        {
                "attributes": {
                    "autocomplete": "current-password",
                    "disabled": false,
                    "name": "password",
                    "node_type": "input",
                    "required": true,
                    "type": "password"
                },
                "group": "password",
                "messages": [],
                "meta": {
                    "label": {
                        "id": 1070001,
                        "text": "Password",
                        "type": "info"
                    }
                },
                "type": "input"
            },
            {
                "attributes": {
                    "disabled": false,
                    "name": "method",
                    "node_type": "input",
                    "type": "submit",
                    "value": "password"
                },
                "group": "password",
                "messages": [],
                "meta": {
                    "label": {
                        "id": 1010017,
                        "text": "Sign in and link",
                        "type": "info"
                    }
                },
                "type": "input"
            }
        ]
    },
    "updated_at": "2024-03-25T17:44:32.334498Z"
}

Reproducing the bug

Run kratos with GitHub and Google social provider enabled as docker containers.

Relevant log output

No response

Relevant configuration

No response

Version

v1.1.0

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker

Additional Context

No response

@MUzairS15 MUzairS15 added the bug Something is not working. label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant