Skip to content

docs: add PAT and organization flow equivalency documentation #1187

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

Closed

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 23, 2025

Problem

Developers were confused about how Personal Access Tokens (PATs) work with organization-related access controls. The existing documentation mentioned that PATs can grant access tokens, but didn't clarify that these tokens work identically to those obtained through the standard refresh_token flow, especially for organization permissions and organization-level API resources.

Solution

Added comprehensive documentation to clarify the equivalency between PAT tokens and refresh tokens for organization contexts:

1. Enhanced PAT Documentation

Added a prominent tip in the PAT documentation explaining that access tokens obtained via PATs work identically to refresh tokens:

:::tip Token flow equivalency

Access tokens obtained using PATs work **identically** to tokens obtained through the standard `refresh_token` flow. This means:

- **Organization context**: PAT-obtained tokens support the same organization permissions and scopes as refresh token flows
- **Authorization flow**: You can use PAT-exchanged access tokens for [organization permissions](/authorization/organization-permissions) and [organization-level API resources](/authorization/organization-level-api-resources)
- **Token validation**: The same validation logic applies - only the initial grant type differs

If you're working with organizations, the access patterns and permissions are the same regardless of whether you use PAT or refresh tokens.

:::

Key points clarified:

  • Organization context support is identical
  • Same authorization flows apply
  • Same validation logic applies
  • Only the initial grant type differs

2. Cross-references to Organization Documentation

Added a new "Organization support" section in PAT docs with direct links to:

  • Organization permissions documentation
  • Organization-level API resources documentation
  • Clear guidance on using organization_id parameter

3. Restructured Related Resources

Enhanced the related resources section by:

  • Adding dedicated "Organization support" subsection
  • Converting existing links to "Additional resources" subsection
  • Providing actionable guidance for programmatic access scenarios

Impact

  • Reduced developer confusion: Clear explanation that PAT and refresh token flows are equivalent for organizations
  • Better cross-linking: Easy navigation between PAT and organization documentation
  • Enhanced developer experience: Actionable guidance for programmatic access scenarios
  • Consistent documentation: Unified messaging across all related pages

Commit Compliance

This PR follows the conventional commit format required by the repository's commitlint configuration:

  • Commit message: docs: add PAT and organization flow equivalency documentation
  • Format: type: description (conventional commits standard)
  • Type: docs (for documentation changes)

Files Changed

  • docs/user-management/personal-access-token.mdx - Added equivalency tip and organization support section (23 lines added)

The changes maintain backward compatibility while providing essential clarity for developers working with organization-scoped authentication flows.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: wangsijie <5717882+wangsijie@users.noreply.github.com>
Copy link

cloudflare-workers-and-pages bot commented Jul 23, 2025

Deploying logto-docs-tutorials with  Cloudflare Pages  Cloudflare Pages

Latest commit: 832a37e
Status: ✅  Deploy successful!
Preview URL: https://9db86545.logto-docs-tutorials.pages.dev
Branch Preview URL: https://copilot-fix-1d0419e7-daec-41.logto-docs-tutorials.pages.dev

View logs

Co-authored-by: wangsijie <5717882+wangsijie@users.noreply.github.com>
Copy link

cloudflare-workers-and-pages bot commented Jul 23, 2025

Deploying logto-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 832a37e
Status: ✅  Deploy successful!
Preview URL: https://352b07d9.logto-docs.pages.dev
Branch Preview URL: https://copilot-fix-1d0419e7-daec-41.logto-docs.pages.dev

View logs

@Copilot Copilot AI changed the title [WIP] create another PR and copy the code in @logto-io/docs/pull/1186, this time, follow the commit lint rule docs: add PAT and organization flow equivalency documentation Jul 23, 2025
@Copilot Copilot AI requested a review from wangsijie July 23, 2025 08:02
Copilot finished work on behalf of wangsijie July 23, 2025 08:02
@wangsijie wangsijie closed this Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants