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

fix: correct the method of linking social identities #979

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/end-user-flows/account-settings/by-account-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ curl -X POST https://[tenant-id].logto.app/api/verifications/social/verify \

The `connectorData` is the data returned by the social connector after the user authorizes the application, you need to parse and get the query parameters from the `redirectUri` in your callback page, and wrap them as a JSON as the value of the `connectorData` field.

Finally, you can use the `PATCH /api/my-account/identities` endpoint to link the social connection.
Finally, you can use the `POST /api/my-account/identities` endpoint to link the social connection.
wangsijie marked this conversation as resolved.
Show resolved Hide resolved

```bash
curl -X PATCH https://[tenant-id].logto.app/api/my-account/identities \
curl -X POST https://[tenant-id].logto.app/api/my-account/identities \
-H 'authorization: Bearer <access_token>' \
-H 'logto-verification-id: <verification_record_id>' \
-H 'content-type: application/json' \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ curl -X POST https://[tenant-id].logto.app/api/verifications/social/verify \

El `connectorData` es el dato devuelto por el conector social después de que el usuario autorice la aplicación, necesitas analizar y obtener los parámetros de consulta del `redirectUri` en tu página de callback, y envolverlos como un JSON como el valor del campo `connectorData`.

Finalmente, puedes usar el endpoint `PATCH /api/my-account/identities` para vincular la conexión social.
Finalmente, puedes usar el endpoint `POST /api/my-account/identities` para vincular la conexión social.

```bash
curl -X PATCH https://[tenant-id].logto.app/api/my-account/identities \
curl -X POST https://[tenant-id].logto.app/api/my-account/identities \
-H 'authorization: Bearer <access_token>' \
-H 'logto-verification-id: <verification_record_id>' \
-H 'content-type: application/json' \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ curl -X POST https://[tenant-id].logto.app/api/verifications/social/verify \

Le `connectorData` est les données retournées par le connecteur social après que l'utilisateur a autorisé l'application, vous devez analyser et obtenir les paramètres de requête de l'`redirectUri` dans votre page de rappel, et les envelopper en JSON comme valeur du champ `connectorData`.

Enfin, vous pouvez utiliser le point de terminaison `PATCH /api/my-account/identities` pour lier la connexion sociale.
Enfin, vous pouvez utiliser le point de terminaison `POST /api/my-account/identities` pour lier la connexion sociale.

```bash
curl -X PATCH https://[tenant-id].logto.app/api/my-account/identities \
curl -X POST https://[tenant-id].logto.app/api/my-account/identities \
-H 'authorization: Bearer <access_token>' \
-H 'logto-verification-id: <verification_record_id>' \
-H 'content-type: application/json' \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ curl -X POST https://[tenant-id].logto.app/api/verifications/social/verify \

`connectorData` は、ユーザーがアプリケーションを認可 (Authorization) した後にソーシャルコネクターから返されるデータで、コールバックページの `redirectUri` からクエリパラメータを解析して取得し、それを JSON として `connectorData` フィールドの値としてラップする必要があります。

最後に、`PATCH /api/my-account/identities` エンドポイントを使用してソーシャル接続をリンクできます。
最後に、`POST /api/my-account/identities` エンドポイントを使用してソーシャル接続をリンクできます。

```bash
curl -X PATCH https://[tenant-id].logto.app/api/my-account/identities \
curl -X POST https://[tenant-id].logto.app/api/my-account/identities \
-H 'authorization: Bearer <access_token>' \
-H 'logto-verification-id: <verification_record_id>' \
-H 'content-type: application/json' \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ curl -X POST https://[tenant-id].logto.app/api/verifications/social/verify \

O `connectorData` são os dados retornados pelo conector social após o usuário autorizar o aplicativo, você precisa analisar e obter os parâmetros de consulta do `redirectUri` em sua página de callback e envolvê-los como um JSON como o valor do campo `connectorData`.

Finalmente, você pode usar o endpoint `PATCH /api/my-account/identities` para vincular a conexão social.
Finalmente, você pode usar o endpoint `POST /api/my-account/identities` para vincular a conexão social.

```bash
curl -X PATCH https://[tenant-id].logto.app/api/my-account/identities \
curl -X POST https://[tenant-id].logto.app/api/my-account/identities \
-H 'authorization: Bearer <access_token>' \
-H 'logto-verification-id: <verification_record_id>' \
-H 'content-type: application/json' \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ curl -X POST https://[tenant-id].logto.app/api/verifications/social/verify \

`connectorData` 是用户授权应用程序后社交连接器返回的数据,你需要在回调页面中解析并获取 `redirectUri` 的查询参数,并将其包装为 JSON 作为 `connectorData` 字段的值。

最后,你可以使用 `PATCH /api/my-account/identities` 端点链接社交连接。
最后,你可以使用 `POST /api/my-account/identities` 端点链接社交连接。

```bash
curl -X PATCH https://[tenant-id].logto.app/api/my-account/identities \
curl -X POST https://[tenant-id].logto.app/api/my-account/identities \
-H 'authorization: Bearer <access_token>' \
-H 'logto-verification-id: <verification_record_id>' \
-H 'content-type: application/json' \
Expand Down
Loading