Skip to content

Commit ecf74f5

Browse files
mintlify[bot]mayankshoucherpmccarter
authored
docs: JWT auth + anchors (#266)
* Documentation edits made through Mintlify web editor * Documentation edits made through Mintlify web editor * Update casing Co-authored-by: Ronan McCarter <[email protected]> --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Mayank Shouche <[email protected]> Co-authored-by: Ronan McCarter <[email protected]>
1 parent 9bc55e7 commit ecf74f5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

advanced/user-auth/jwt.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@ I want to set up authentication for my docs hosted at `docs.foo.com`. I want my
3030
To set up authentication with Mintlify, I go to my Mintlify dashboard and generate a JWT secret. I create a web URL `https://foo.com/docs-login` that initiates a login flow for my users. At the end of this login flow, once I have verified the identity of the user, I create a JWT containing the user’s custom data according to Mintlify’s specification. I sign this JWT with my Mintlify secret, create a redirect URL of the form `https://docs.foo.com#{SIGNED_JWT}`, and redirect the user.
3131

3232
I then go to the Mintlify dashboard settings and enter `https://foo.com/docs-login` for the Login URL field.
33+
34+
## Preserving Anchors
35+
36+
Post-login, if you'd like to redirect to a specific anchor on the page, you can use the following format to create the redirect URL: `https://docs.foo.com/page#jwt={SIGNED_JWT}&anchor={ANCHOR}`.
37+
38+
Example:
39+
40+
- Original: `https://docs.foo.com/quickstart#step-one`
41+
- Redirect: `https://docs.foo.com/quickstart#jwt={SIGNED_JWT}&anchor=step-one`

0 commit comments

Comments
 (0)