From ccbe2024246789a3a998e30bc438129c7d379721 Mon Sep 17 00:00:00 2001 From: Philippe Gaultier Date: Thu, 8 May 2025 12:33:18 +0200 Subject: [PATCH] fix(docs): fix links to `toSession` On the page https://www.ory.sh/docs/identities/session-to-jwt-cors/, right after the sentence `Great! Everything is set up! Let's convert an Ory Session to a JWT:`, when we click on the `REST API` tab, the link `For more details see the [API documentation](https://www.ory.sh/docs/identities/reference/api#tag/frontend/operation/toSession).` leads to a 404. This PR fixes it and makes all links to `toSession` relative per the guidelines in the README. Note 1: There are still ~200 or so links referring directly to `ory.sh/docs` instead of being relative. But this is a big task to update them all so I did not. Note 2: `npm build` does detection of broken links but it did not catch this issue because the link actually points to an [existing file](https://github.com/ory/docs/blob/cf3c62ccc66dc4eb417c4aed13823778284c1949/docs/reference/api.mdx#L1-L1), just not the right one. --- docs/identities/session-to-jwt-cors.mdx | 2 +- docs/kratos/sdk/05_go.mdx | 6 ++---- docs/kratos/self-hosted/05_go.mdx | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/identities/session-to-jwt-cors.mdx b/docs/identities/session-to-jwt-cors.mdx index c19a81b87..13638fd16 100644 --- a/docs/identities/session-to-jwt-cors.mdx +++ b/docs/identities/session-to-jwt-cors.mdx @@ -88,7 +88,7 @@ curl -X GET \ } ``` -For more details see the [API documentation](../reference/api#tag/frontend/operation/toSession). +For more details see the [API documentation](../kratos/reference/api#tag/frontend/operation/toSession). diff --git a/docs/kratos/sdk/05_go.mdx b/docs/kratos/sdk/05_go.mdx index 0da1405e5..2f530447e 100644 --- a/docs/kratos/sdk/05_go.mdx +++ b/docs/kratos/sdk/05_go.mdx @@ -176,8 +176,7 @@ import submitVerification from '!!raw-loader!../../../code-examples/sdk/go/front ### Browser - check who the current HTTP session belongs to -This example uses [toSession](https://www.ory.sh/docs/reference/api#tag/frontend/operation/toSession) call to check if the session -is active. +This example uses [toSession](../reference/api#tag/frontend/operation/toSession) call to check if the session is active. 1. Open the [Ory Identities Playground](https://playground.projects.oryapis.com/ui/) in your browser 1. Open **Sign Up** to create an account and log in @@ -199,8 +198,7 @@ import whoamiBrowser from '!!raw-loader!../../../code-examples/sdk/go/frontend/w ### Native - check who the current HTTP session belongs to -This example uses [toSession](https://www.ory.sh/docs/reference/api#tag/frontend/operation/toSession) call to check if the session -is active. +This example uses [toSession](../reference/api#tag/frontend/operation/toSession) call to check if the session is active. ```mdx-code-block import whoamiNative from '!!raw-loader!../../../code-examples/sdk/go/frontend/whoami-native.go' diff --git a/docs/kratos/self-hosted/05_go.mdx b/docs/kratos/self-hosted/05_go.mdx index 5af222b51..1ff457803 100644 --- a/docs/kratos/self-hosted/05_go.mdx +++ b/docs/kratos/self-hosted/05_go.mdx @@ -66,8 +66,7 @@ The following code examples show how to use the [FrontendAPI](https://www.ory.sh ### toSession -In this example you make a [toSession](https://www.ory.sh/docs/kratos/reference/api#tag/frontend/operation/toSession) call to -check if the session is active. +In this example you make a [toSession](../reference/api#tag/frontend/operation/toSession) call to check if the session is active. 1. Open the the local hosted UI in your browser 1. Sign up and create an account and log in