-
-
Notifications
You must be signed in to change notification settings - Fork 477
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: Social Connection Identity Linking API Inconsistency #6947
Comments
Hi, thanks for the report. The sample code in the documentation is indeed misleading. Please use the POST method instead. We will update the documentation as soon as possible. Regarding the 401 error you encountered in step 5, it’s likely that you are passing the wrong Logto requires users to re-identify themselves before making any sensitive updates to their profile. Please refer to this section for more details. The As for the |
Thank you for the detailed follow-up! I managed to complete the social connection flow following your guidance about user re-authentication. However, I encountered another issue that's worth mentioning - the access token needs the "identities" scope. Here's what happened: POST /api/my-account/identities
Authorization: Bearer <token>
logto-verification-id: <user-verification-id>
{
"newIdentifierVerificationRecordId": "<social-verification-id>"
}
Response: 400 Bad Request
{
"message": "Unauthorized. Please check credentials and its scope.",
"code": "auth.unauthorized"
} Adding The social connection flow involves several steps and can be quite complex. To help other Logto users, I'm planning to write a blog post with detailed steps and sample code. Thanks again for the help and you can close this issue. |
I've published a detailed tutorial on implementing GitHub account linking with Logto in Next.js applications: https://github.com/suin/logto-next-connect-github/blob/main/doc/README.md The tutorial covers:
I hope this helps other developers implementing social account linking with Logto! I'm open to any feedback and happy to improve the content. Also, would you be interested in having this content published on the Logto official blog? I'd be glad to refine the article based on your feedback to make it more helpful for the Logto community. |
Describe the bug
The API endpoint for linking social identities shows inconsistencies between documentation and implementation:
PATCH /api/my-account/identities
Allow: POST
header and 405 Method Not Allowed for PATCHverification_record.permission_denied
This makes it impossible to complete the social connection linking flow.
Expected behavior
Either:
How to reproduce?
→ Returns 201 with verification record ID
Complete GitHub OAuth flow and receive callback code
Verify the social connection:
→ Returns 200 OK
→ Returns 405 Method Not Allowed
→ Returns 401 Unauthorized (verification_record.permission_denied)
Context
The text was updated successfully, but these errors were encountered: