Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add docs link to provider pop up, add better GitHub docs#829

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
fomalhautb wants to merge66 commits intodev
base:dev
Choose a base branch
Loading
fromupdate-oauth-docs

Conversation

@fomalhautb
Copy link
Contributor

@fomalhautbfomalhautb commentedAug 5, 2025
edited by cursorbot
Loading

image

Important

Add documentation link to provider pop-up and improve GitHub setup instructions with tabs for OAuth and GitHub apps.

  • UI Changes:
    • Add a documentation link to the provider pop-up inproviders.tsx for detailed provider setup.
    • Display a note for GitHub apps requiring public status and read-only email permissions inproviders.tsx.
  • Documentation:
    • Updategithub.mdx to include tabs for OAuth App and GitHub App setup instructions.
    • Add detailed steps for creating GitHub Apps, including enabling read-only email permissions and making the app public.

This description was created byEllipsis for484cb1c. You cancustomize this summary. It will automatically update as commits are pushed.

Summary by CodeRabbit

  • New Features

    • Show an informational note for GitHub OAuth providers when "shared" is not selected, clarifying the app must be public and have read-only email permission.
    • Add a small outlined link-style button beneath provider settings that opens the provider's documentation in a new tab (includes a right-arrow visual cue).
  • Documentation

    • Update GitHub auth docs with tabs separating OAuth App and GitHub App setup steps for clearer guidance.

Note

Adds a docs link to the provider settings dialog and updates GitHub auth docs with tabbed OAuth/GitHub App instructions and requirements.

  • UI (Dashboard):
    • Inapps/dashboard/.../auth-methods/providers.tsx:
      • Add outlined "See full documentation" link button (opens in new tab) pointing to.../concepts/auth-providers/{providerId}.
      • Show note forgithub (when not using shared keys): app must be public and have read-only email permissions.
  • Docs:
    • Indocs/templates/concepts/auth-providers/github.mdx:
      • Add tabs separating setup forOAuth App andGitHub App.
      • Document GitHub App requirements: enable read-only email permission and make the app public.

Written byCursor Bugbot for commit21b284e. This will update automatically on new commits. Configurehere.

greptile-apps[bot] reacted with thumbs up emojiellipsis-dev[bot] reacted with rocket emoji
@vercel
Copy link

vercelbot commentedAug 5, 2025
edited
Loading

The latest updates on your projects. Learn more aboutVercel for GitHub.

ProjectDeploymentPreviewCommentsUpdated (UTC)
stack-backendReadyReadyPreviewCommentNov 5, 2025 11:40am
stack-dashboardErrorErrorNov 5, 2025 11:40am
stack-demoReadyReadyPreviewCommentNov 5, 2025 11:40am
stack-docsReadyReadyPreviewCommentNov 5, 2025 11:40am

@coderabbitai
Copy link
Contributor

coderabbitaibot commentedAug 5, 2025
edited
Loading

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a conditional informational note and a documentation link button to the GitHub OAuth provider settings in the dashboard UI; updates the GitHub auth provider docs to a tabbed layout separating "OAuth App" and "GitHub App" instructions and adds GitHub App-specific steps (public app and read-only email permission).

Changes

Cohort / File(s)Change Summary
Dashboard UI: GitHub OAuth Provider Note & Docs Link
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx
Adds a conditional info note displayed when the GitHub provider is selected and theshared option is not set; adds an outlined small link-style button (withArrowRight icon) that opens the provider-specific documentation in a new tab. Imports updated (Link,buttonVariants,cn,ArrowRight).
Documentation: Tabbed GitHub Auth Provider Instructions
docs/templates/concepts/auth-providers/github.mdx
Replaces single-flow GitHub docs with two tabs: "OAuth App" (existing OAuth App steps) and "GitHub App" (new GitHub App-specific steps including making the app public and enabling read-only email permission). Other integration steps unchanged.

Sequence Diagram(s)

sequenceDiagram    participant User    participant DashboardUI    participant DocsSite    User->>DashboardUI: Open provider settings (GitHub)    DashboardUI-->>User: Render settings form    alt Provider is GitHub & "shared" not selected        DashboardUI-->>User: Show info note about public GitHub App & read-only email    end    User->>DashboardUI: Click "View full documentation" link/button    DashboardUI->>DocsSite: Open provider docs URL (new tab)    DocsSite-->>User: Display docs with tabs: "OAuth App" / "GitHub App"
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A rabbit hops through code and guides,
Tabs split the path where knowledge hides.
A tiny arrow points the way,
Docs open bright to save the day.
Hop on, devs—both routes display. 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branchupdate-oauth-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat withCodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag@coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag@coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on oursupport page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type@coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add@coderabbitai ignore or@coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add@coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add@coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a.coderabbit.yaml file to the root of your repository.
  • Please see theconfiguration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit ourStatus Page to check the current availability of CodeRabbit.
  • Visit ourDocumentation for detailed information on how to use CodeRabbit.
  • Join ourDiscord Community to get help, request features, and share feedback.
  • Follow us onX/Twitter for updates and announcements.

@recurseml
Copy link

✨ No issues found! Your code is sparkling clean! ✨

🗒️ View all ignored comments in this repo
  • The constraint 'TokenStoreType extends string' is too restrictive. It should likely be 'TokenStoreType extends string | object' to match the condition check in line 113 where TokenStoreType is checked against {}
  • Return type mismatch - the interface declares useUsers() returning ServerUser[] but the Team interface that this extends declares useUsers() returning TeamUser[]
  • There is a syntax error in the super constructor call due to the ellipsis operator used incorrectly. Objects aren't being merged correctly. This syntax usage can lead to runtime errors when trying to pass the merged object to 'super()'. Verify that the intended alterations to the object occur before or outside of the super() call if needed.
  • Throwing an error when no active span is found is too aggressive. The log function should gracefully fallback to console.log or another logging mechanism when there's no active span, since not all execution contexts will have an active span. This makes the code less resilient and could break functionality in non-traced environments.

📚Relevant Docs

  • Function sets backendContext with a new configuration but doesn't pass 'defaultProjectKeys'. Since defaultProjectKeys is required in the type definition and cannot be updated (throws error if tried to set), this will cause a type error.
  • The schema is using array syntax for pick() which is incorrect for Yup schemas. The pick() method in Yup expects individual arguments, not an array. Should be changed to: emailConfigSchema.pick('type', 'host', 'port', 'username', 'sender_name', 'sender_email')

📚Relevant Docs

  • Creating a refresh token with current timestamp as expiration means it expires immediately. Should set a future date for token expiration.
  • The 'tools' object is initialized as an empty object, even though 'tools' is presumably expected to contain tool definitions. This could cause the server capabilities to lack necessary tool configurations, thus potentially impacting functionalities that depend on certain tool setups.

📚Relevant Docs

  • 'STACK_SECRET_SERVER_KEY' is potentially being included in every request header without checking its existence again here. Although it's checked during initialization, this could lead to security issues as it's exposed in all communications where the header is logged or captured.

📚Relevant Docs

  • When adding 'use client' directive at the beginning, it doesn't check if file.text already contains the 'use client' directive. This could lead to duplicate 'use client' directives if the file already has one.

📚Relevant Docs

Need help? Join our Discord for support!
https://discord.gg/qEjHQk64Z9

@fomalhautbfomalhautb assignedN2D4 and unassignedfomalhautbAug 5, 2025
@fomalhautbfomalhautb requested a review fromN2D4August 5, 2025 21:16
@fomalhautbfomalhautb marked this pull request as ready for reviewAugust 5, 2025 21:16
Copy link
Contributor

@greptile-appsgreptile-appsbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Greptile Summary

This PR enhances the OAuth provider configuration experience by adding direct documentation links and GitHub-specific guidance. In the dashboard's provider settings dialog (providers.tsx), a new documentation link is added that dynamically constructs URLs to provider-specific documentation, opening in a new tab for easy reference. The implementation includes special handling for GitHub providers with a helpful note about requiring public apps with email permissions.

Concurrently, the GitHub OAuth documentation (github.mdx) has been significantly improved with a tabbed interface that covers both OAuth Apps and GitHub Apps setup processes. This addresses the reality that GitHub offers two different OAuth integration methods, each with distinct configuration requirements. The documentation now provides clear, step-by-step instructions for both approaches, including critical details about permissions and app visibility settings.

These changes work together to create a seamless user experience: when users encounter the GitHub provider in the dashboard, they can click the documentation link to access the newly enhanced GitHub docs that cover both OAuth methods. This integration reduces the need for users to search for setup instructions externally and provides context-aware guidance directly within the configuration workflow.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk of breaking existing functionality
  • Score reflects straightforward UI enhancements and documentation improvements with no complex logic changes
  • Pay close attention to the dynamic URL construction inproviders.tsx for potential edge cases

2 files reviewed, 2 comments

Edit Code Review Bot Settings |Greptile

<Link
className={cn(buttonVariants({variant:"outline",size:"sm"}),"gap-2 mt-2")}
href={`https://docs.stack-auth.com/docs/next/concepts/auth-providers/${props.id}`}
target="_blank"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

style: Addrel="noopener noreferrer" for security when opening external links in new tabs.

Suggested change
target="_blank"
target="_blank"
rel="noopener noreferrer"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
target="_blank"
target="_blank"
rel="noopener"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

referrer is fine but we want noopener

<Link
className={cn(buttonVariants({variant:"outline",size:"sm"}),"gap-2 mt-2")}
href={`https://docs.stack-auth.com/docs/next/concepts/auth-providers/${props.id}`}
target="_blank"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
target="_blank"
target="_blank"
rel="noopener"

<Link
className={cn(buttonVariants({variant:"outline",size:"sm"}),"gap-2 mt-2")}
href={`https://docs.stack-auth.com/docs/next/concepts/auth-providers/${props.id}`}
target="_blank"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

referrer is fine but we want noopener

@N2D4N2D4 assignedfomalhautb and unassignedN2D4Aug 7, 2025
@claude
Copy link
Contributor

claudebot commentedAug 8, 2025
edited
Loading

Claude finished@fomalhautb's task ——View job


Pull Request Review

I've reviewed the changes in this PR and overall they look good! The implementation adds helpful UX improvements while maintaining code quality. Here's my detailed feedback:

Todo List:

  • Read and analyze the modified files
  • Review providers.tsx changes for UI/security concerns
  • Review github.mdx documentation changes
  • Check for potential bugs and performance issues
  • Assess test coverage needs
  • Provide comprehensive feedback

Strengths

UI/UX Improvements:

  • Dynamic documentation links - The addition of provider-specific documentation links (apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx:174-181) is excellent for user experience
  • GitHub-specific guidance - The conditional note for GitHub apps (lines 168-172) provides valuable context about requirements
  • Consistent styling - Uses existing design system components and follows established patterns

Documentation Enhancements:

  • Tabbed interface - The new tabbed structure indocs/templates/concepts/auth-providers/github.mdx:15-41 clearly separates OAuth App vs GitHub App instructions
  • Comprehensive coverage - Both setup paths are well documented with step-by-step instructions

⚠️Security Concerns (Critical)

Missing Security Attributes:

  • Line 177 inproviders.tsx: The external link lacks security attributes. This is asecurity vulnerability as noted by other reviewers.
// Current (vulnerable):target="_blank"// Should be:target="_blank"rel="noopener noreferrer"

Why this matters:

  • Withoutrel="noopener", the new page can accesswindow.opener and potentially redirect the original page
  • Withoutrel="noreferrer", the referrer header is sent, which could leak sensitive information
  • This is especially important for documentation links that open external domains

📝Minor Issues

Documentation Formatting:

  • Line 31 ingithub.mdx: Inconsistent heading level. Should use### to match the OAuth App heading structure for better document hierarchy.

Code Quality:

  • The dynamic URL construction at line 176 is functional but could be more robust with better error handling for undefined provider IDs
  • Consider adding TypeScript assertion or validation for the provider ID

🚀Performance Considerations

  • Low impact: The changes are minimal UI additions with no significant performance implications
  • The dynamic URL construction is simple string interpolation with negligible overhead
  • Documentation links open in new tabs, avoiding main application disruption

🧪Test Coverage Assessment

  • No new tests needed: The changes are primarily UI/documentation enhancements
  • The conditional GitHub note logic is straightforward and covered by existing form validation
  • The documentation link is a simple anchor tag with no complex logic requiring unit tests
  • Recommendation: Consider adding E2E tests for the documentation link functionality if not already covered

💡Recommendations

  1. Fix security issue immediately - Addrel="noopener noreferrer" to the documentation link
  2. Consider validation - Add provider ID validation before URL construction to handle edge cases
  3. Consistency - Fix the documentation heading level ingithub.mdx

🎯Overall Assessment

This is a well-implemented feature that significantly improves user experience by providing direct access to provider-specific documentation. The code follows existing patterns and maintains consistency with the codebase. The only critical issue is the missing security attributes on the external link, which should be fixed before merging.

Recommendation: Approve after fixing the security concern

@claude
Copy link
Contributor

claudebot commentedAug 9, 2025
edited
Loading

Claude finished@fomalhautb's task ——View job


Pull Request Review

I've reviewed the changes in this PR and overall they look good! The implementation adds helpful UX improvements while maintaining code quality. Here's my detailed feedback:

Todo List:

  • Read and analyze the modified files
  • Review providers.tsx changes for UI/security concerns
  • Review github.mdx documentation changes
  • Check for potential bugs and performance issues
  • Assess test coverage needs
  • Provide comprehensive feedback

Strengths

UI/UX Improvements:

  • Dynamic documentation links - The addition of provider-specific documentation links (apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx:174-181) is excellent for user experience
  • GitHub-specific guidance - The conditional note for GitHub apps (lines 168-172) provides valuable context about requirements
  • Consistent styling - Uses existing design system components and follows established patterns

Documentation Enhancements:

  • Tabbed interface - The new tabbed structure indocs/templates/concepts/auth-providers/github.mdx:15-41 clearly separates OAuth App vs GitHub App instructions
  • Comprehensive coverage - Both setup paths are well documented with step-by-step instructions

⚠️Security Concerns (Critical)

Missing Security Attributes:

  • Line 177 inproviders.tsx: The external link lacks security attributes. This is asecurity vulnerability as noted by other reviewers.
// Current (vulnerable):target="_blank"// Should be:target="_blank"rel="noopener noreferrer"

Why this matters:

  • Withoutrel="noopener", the new page can accesswindow.opener and potentially redirect the original page
  • Withoutrel="noreferrer", the referrer header is sent, which could leak sensitive information
  • This is especially important for documentation links that open external domains

📝Minor Issues

Documentation Formatting:

  • Line 31 ingithub.mdx: Inconsistent heading level. Should use### to match the OAuth App heading structure for better document hierarchy.

Code Quality:

  • The dynamic URL construction at line 176 is functional but could be more robust with better error handling for undefined provider IDs
  • Consider adding TypeScript assertion or validation for the provider ID

🚀Performance Considerations

  • Low impact: The changes are minimal UI additions with no significant performance implications
  • The dynamic URL construction is simple string interpolation with negligible overhead
  • Documentation links open in new tabs, avoiding main application disruption

🧪Test Coverage Assessment

  • No new tests needed: The changes are primarily UI/documentation enhancements
  • The conditional GitHub note logic is straightforward and covered by existing form validation
  • The documentation link is a simple anchor tag with no complex logic requiring unit tests
  • Recommendation: Consider adding E2E tests for the documentation link functionality if not already covered

💡Recommendations

  1. Fix security issue immediately - Addrel="noopener noreferrer" to the documentation link
  2. Consider validation - Add provider ID validation before URL construction to handle edge cases
  3. Consistency - Fix the documentation heading level ingithub.mdx

🎯Overall Assessment

This is a well-implemented feature that significantly improves user experience by providing direct access to provider-specific documentation. The code follows existing patterns and maintains consistency with the codebase. The only critical issue is the missing security attributes on the external link, which should be fixed before merging.

Recommendation: Approve after fixing the security concern

@claude
Copy link
Contributor

claudebot commentedAug 12, 2025
edited
Loading

Claude finished@fomalhautb's task ——View job


Pull Request Review

I've reviewed the changes in this PR and overall they look good! The implementation adds helpful UX improvements while maintaining code quality. Here's my detailed feedback:

Todo List:

  • Read and analyze the modified files
  • Review providers.tsx changes for UI/security concerns
  • Review github.mdx documentation changes
  • Check for potential bugs and performance issues
  • Assess test coverage needs
  • Provide comprehensive feedback

Strengths

UI/UX Improvements:

  • Dynamic documentation links - The addition of provider-specific documentation links (apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx:174-181) is excellent for user experience
  • GitHub-specific guidance - The conditional note for GitHub apps (lines 168-172) provides valuable context about requirements
  • Consistent styling - Uses existing design system components and follows established patterns

Documentation Enhancements:

  • Tabbed interface - The new tabbed structure indocs/templates/concepts/auth-providers/github.mdx:15-41 clearly separates OAuth App vs GitHub App instructions
  • Comprehensive coverage - Both setup paths are well documented with step-by-step instructions

⚠️Security Concerns (Critical)

Missing Security Attributes:

  • Line 177 inproviders.tsx: The external link lacks security attributes. This is asecurity vulnerability as noted by other reviewers.
// Current (vulnerable):target="_blank"// Should be:target="_blank"rel="noopener noreferrer"

Why this matters:

  • Withoutrel="noopener", the new page can accesswindow.opener and potentially redirect the original page
  • Withoutrel="noreferrer", the referrer header is sent, which could leak sensitive information
  • This is especially important for documentation links that open external domains

📝Minor Issues

Documentation Formatting:

  • Line 31 ingithub.mdx: Inconsistent heading level. Should use### to match the OAuth App heading structure for better document hierarchy.

Code Quality:

  • The dynamic URL construction at line 176 is functional but could be more robust with better error handling for undefined provider IDs
  • Consider adding TypeScript assertion or validation for the provider ID

🚀Performance Considerations

  • Low impact: The changes are minimal UI additions with no significant performance implications
  • The dynamic URL construction is simple string interpolation with negligible overhead
  • Documentation links open in new tabs, avoiding main application disruption

🧪Test Coverage Assessment

  • No new tests needed: The changes are primarily UI/documentation enhancements
  • The conditional GitHub note logic is straightforward and covered by existing form validation
  • The documentation link is a simple anchor tag with no complex logic requiring unit tests
  • Recommendation: Consider adding E2E tests for the documentation link functionality if not already covered

💡Recommendations

  1. Fix security issue immediately - Addrel="noopener noreferrer" to the documentation link
  2. Consider validation - Add provider ID validation before URL construction to handle edge cases
  3. Consistency - Fix the documentation heading level ingithub.mdx

🎯Overall Assessment

This is a well-implemented feature that significantly improves user experience by providing direct access to provider-specific documentation. The code follows existing patterns and maintains consistency with the codebase. The only critical issue is the missing security attributes on the external link, which should be fixed before merging.

Recommendation: Approve after fixing the security concern

@claude
Copy link
Contributor

claudebot commentedAug 13, 2025
edited
Loading

Claude finished@fomalhautb's task ——View job


Pull Request Review

I've reviewed the changes in this PR and overall they look good! The implementation adds helpful UX improvements while maintaining code quality. Here's my detailed feedback:

Todo List:

  • Read and analyze the modified files
  • Review providers.tsx changes for UI/security concerns
  • Review github.mdx documentation changes
  • Check for potential bugs and performance issues
  • Assess test coverage needs
  • Provide comprehensive feedback

Strengths

UI/UX Improvements:

  • Dynamic documentation links - The addition of provider-specific documentation links (apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx:174-181) is excellent for user experience
  • GitHub-specific guidance - The conditional note for GitHub apps (lines 168-172) provides valuable context about requirements
  • Consistent styling - Uses existing design system components and follows established patterns

Documentation Enhancements:

  • Tabbed interface - The new tabbed structure indocs/templates/concepts/auth-providers/github.mdx:15-41 clearly separates OAuth App vs GitHub App instructions
  • Comprehensive coverage - Both setup paths are well documented with step-by-step instructions

⚠️Security Concerns (Critical)

Missing Security Attributes:

  • Line 177 inproviders.tsx: The external link lacks security attributes. This is asecurity vulnerability as noted by other reviewers.
// Current (vulnerable):target="_blank"// Should be:target="_blank"rel="noopener noreferrer"

Why this matters:

  • Withoutrel="noopener", the new page can accesswindow.opener and potentially redirect the original page
  • Withoutrel="noreferrer", the referrer header is sent, which could leak sensitive information
  • This is especially important for documentation links that open external domains

📝Minor Issues

Documentation Formatting:

  • Line 31 ingithub.mdx: Inconsistent heading level. Should use### to match the OAuth App heading structure for better document hierarchy.

Code Quality:

  • The dynamic URL construction at line 176 is functional but could be more robust with better error handling for undefined provider IDs
  • Consider adding TypeScript assertion or validation for the provider ID

🚀Performance Considerations

  • Low impact: The changes are minimal UI additions with no significant performance implications
  • The dynamic URL construction is simple string interpolation with negligible overhead
  • Documentation links open in new tabs, avoiding main application disruption

🧪Test Coverage Assessment

  • No new tests needed: The changes are primarily UI/documentation enhancements
  • The conditional GitHub note logic is straightforward and covered by existing form validation
  • The documentation link is a simple anchor tag with no complex logic requiring unit tests
  • Recommendation: Consider adding E2E tests for the documentation link functionality if not already covered

💡Recommendations

  1. Fix security issue immediately - Addrel="noopener noreferrer" to the documentation link
  2. Consider validation - Add provider ID validation before URL construction to handle edge cases
  3. Consistency - Fix the documentation heading level ingithub.mdx

🎯Overall Assessment

This is a well-implemented feature that significantly improves user experience by providing direct access to provider-specific documentation. The code follows existing patterns and maintains consistency with the codebase. The only critical issue is the missing security attributes on the external link, which should be fixed before merging.

Recommendation: Approve after fixing the security concern

@claude
Copy link
Contributor

claudebot commentedAug 15, 2025
edited
Loading

Claude finished@fomalhautb's task ——View job


Pull Request Review

I've reviewed the changes in this PR and overall they look good! The implementation adds helpful UX improvements while maintaining code quality. Here's my detailed feedback:

Todo List:

  • Read and analyze the modified files
  • Review providers.tsx changes for UI/security concerns
  • Review github.mdx documentation changes
  • Check for potential bugs and performance issues
  • Assess test coverage needs
  • Provide comprehensive feedback

Strengths

UI/UX Improvements:

  • Dynamic documentation links - The addition of provider-specific documentation links (apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx:174-181) is excellent for user experience
  • GitHub-specific guidance - The conditional note for GitHub apps (lines 168-172) provides valuable context about requirements
  • Consistent styling - Uses existing design system components and follows established patterns

Documentation Enhancements:

  • Tabbed interface - The new tabbed structure indocs/templates/concepts/auth-providers/github.mdx:15-41 clearly separates OAuth App vs GitHub App instructions
  • Comprehensive coverage - Both setup paths are well documented with step-by-step instructions

⚠️Security Concerns (Critical)

Missing Security Attributes:

  • Line 177 inproviders.tsx: The external link lacks security attributes. This is asecurity vulnerability as noted by other reviewers.
// Current (vulnerable):target="_blank"// Should be:target="_blank"rel="noopener noreferrer"

Why this matters:

  • Withoutrel="noopener", the new page can accesswindow.opener and potentially redirect the original page
  • Withoutrel="noreferrer", the referrer header is sent, which could leak sensitive information
  • This is especially important for documentation links that open external domains

📝Minor Issues

Documentation Formatting:

  • Line 31 ingithub.mdx: Inconsistent heading level. Should use### to match the OAuth App heading structure for better document hierarchy.

Code Quality:

  • The dynamic URL construction at line 176 is functional but could be more robust with better error handling for undefined provider IDs
  • Consider adding TypeScript assertion or validation for the provider ID

🚀Performance Considerations

  • Low impact: The changes are minimal UI additions with no significant performance implications
  • The dynamic URL construction is simple string interpolation with negligible overhead
  • Documentation links open in new tabs, avoiding main application disruption

🧪Test Coverage Assessment

  • No new tests needed: The changes are primarily UI/documentation enhancements
  • The conditional GitHub note logic is straightforward and covered by existing form validation
  • The documentation link is a simple anchor tag with no complex logic requiring unit tests
  • Recommendation: Consider adding E2E tests for the documentation link functionality if not already covered

💡Recommendations

  1. Fix security issue immediately - Addrel="noopener noreferrer" to the documentation link
  2. Consider validation - Add provider ID validation before URL construction to handle edge cases
  3. Consistency - Fix the documentation heading level ingithub.mdx

🎯Overall Assessment

This is a well-implemented feature that significantly improves user experience by providing direct access to provider-specific documentation. The code follows existing patterns and maintains consistency with the codebase. The only critical issue is the missing security attributes on the external link, which should be fixed before merging.

Recommendation: Approve after fixing the security concern

…/auth-methods/providers.tsxCo-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
@claude
Copy link
Contributor

claudebot commentedAug 19, 2025
edited
Loading

Claude finished@fomalhautb's task ——View job


Pull Request Review

I've reviewed the changes in this PR and overall they look good! The implementation adds helpful UX improvements while maintaining code quality. Here's my detailed feedback:

Todo List:

  • Read and analyze the modified files
  • Review providers.tsx changes for UI/security concerns
  • Review github.mdx documentation changes
  • Check for potential bugs and performance issues
  • Assess test coverage needs
  • Provide comprehensive feedback

Strengths

UI/UX Improvements:

  • Dynamic documentation links - The addition of provider-specific documentation links (apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx:174-181) is excellent for user experience
  • GitHub-specific guidance - The conditional note for GitHub apps (lines 168-172) provides valuable context about requirements
  • Consistent styling - Uses existing design system components and follows established patterns

Documentation Enhancements:

  • Tabbed interface - The new tabbed structure indocs/templates/concepts/auth-providers/github.mdx:15-41 clearly separates OAuth App vs GitHub App instructions
  • Comprehensive coverage - Both setup paths are well documented with step-by-step instructions

⚠️Security Concerns (Critical)

Missing Security Attributes:

  • Line 177 inproviders.tsx: The external link lacks security attributes. This is asecurity vulnerability as noted by other reviewers.
// Current (vulnerable):target="_blank"// Should be:target="_blank"rel="noopener noreferrer"

Why this matters:

  • Withoutrel="noopener", the new page can accesswindow.opener and potentially redirect the original page
  • Withoutrel="noreferrer", the referrer header is sent, which could leak sensitive information
  • This is especially important for documentation links that open external domains

📝Minor Issues

Documentation Formatting:

  • Line 31 ingithub.mdx: Inconsistent heading level. Should use### to match the OAuth App heading structure for better document hierarchy.

Code Quality:

  • The dynamic URL construction at line 176 is functional but could be more robust with better error handling for undefined provider IDs
  • Consider adding TypeScript assertion or validation for the provider ID

🚀Performance Considerations

  • Low impact: The changes are minimal UI additions with no significant performance implications
  • The dynamic URL construction is simple string interpolation with negligible overhead
  • Documentation links open in new tabs, avoiding main application disruption

🧪Test Coverage Assessment

  • No new tests needed: The changes are primarily UI/documentation enhancements
  • The conditional GitHub note logic is straightforward and covered by existing form validation
  • The documentation link is a simple anchor tag with no complex logic requiring unit tests
  • Recommendation: Consider adding E2E tests for the documentation link functionality if not already covered

💡Recommendations

  1. Fix security issue immediately - Addrel="noopener noreferrer" to the documentation link
  2. Consider validation - Add provider ID validation before URL construction to handle edge cases
  3. Consistency - Fix the documentation heading level ingithub.mdx

🎯Overall Assessment

This is a well-implemented feature that significantly improves user experience by providing direct access to provider-specific documentation. The code follows existing patterns and maintains consistency with the codebase. The only critical issue is the missing security attributes on the external link, which should be fixed before merging.

Recommendation: Approve after fixing the security concern


Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@claude
Copy link
Contributor

claudebot commentedAug 19, 2025
edited
Loading

Claude finished@fomalhautb's task ——View job


Pull Request Review

I've reviewed the changes in this PR and overall they look good! The implementation adds helpful UX improvements while maintaining code quality. Here's my detailed feedback:

Todo List:

  • Read and analyze the modified files
  • Review providers.tsx changes for UI/security concerns
  • Review github.mdx documentation changes
  • Check for potential bugs and performance issues
  • Assess test coverage needs
  • Provide comprehensive feedback

Strengths

UI/UX Improvements:

  • Dynamic documentation links - The addition of provider-specific documentation links (apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx:174-181) is excellent for user experience
  • GitHub-specific guidance - The conditional note for GitHub apps (lines 168-172) provides valuable context about requirements
  • Consistent styling - Uses existing design system components and follows established patterns

Documentation Enhancements:

  • Tabbed interface - The new tabbed structure indocs/templates/concepts/auth-providers/github.mdx:15-41 clearly separates OAuth App vs GitHub App instructions
  • Comprehensive coverage - Both setup paths are well documented with step-by-step instructions

⚠️Security Concerns (Critical)

Missing Security Attributes:

  • Line 177 inproviders.tsx: The external link lacks security attributes. This is asecurity vulnerability as noted by other reviewers.
// Current (vulnerable):target="_blank"// Should be:target="_blank"rel="noopener noreferrer"

Why this matters:

  • Withoutrel="noopener", the new page can accesswindow.opener and potentially redirect the original page
  • Withoutrel="noreferrer", the referrer header is sent, which could leak sensitive information
  • This is especially important for documentation links that open external domains

📝Minor Issues

Documentation Formatting:

  • Line 31 ingithub.mdx: Inconsistent heading level. Should use### to match the OAuth App heading structure for better document hierarchy.

Code Quality:

  • The dynamic URL construction at line 176 is functional but could be more robust with better error handling for undefined provider IDs
  • Consider adding TypeScript assertion or validation for the provider ID

🚀Performance Considerations

  • Low impact: The changes are minimal UI additions with no significant performance implications
  • The dynamic URL construction is simple string interpolation with negligible overhead
  • Documentation links open in new tabs, avoiding main application disruption

🧪Test Coverage Assessment

  • No new tests needed: The changes are primarily UI/documentation enhancements
  • The conditional GitHub note logic is straightforward and covered by existing form validation
  • The documentation link is a simple anchor tag with no complex logic requiring unit tests
  • Recommendation: Consider adding E2E tests for the documentation link functionality if not already covered

💡Recommendations

  1. Fix security issue immediately - Addrel="noopener noreferrer" to the documentation link
  2. Consider validation - Add provider ID validation before URL construction to handle edge cases
  3. Consistency - Fix the documentation heading level ingithub.mdx

🎯Overall Assessment

This is a well-implemented feature that significantly improves user experience by providing direct access to provider-specific documentation. The code follows existing patterns and maintains consistency with the codebase. The only critical issue is the missing security attributes on the external link, which should be fixed before merging.

Recommendation: Approve after fixing the security concern

@fomalhautbfomalhautbenabled auto-merge (squash)August 19, 2025 02:18
cursor[bot]

This comment was marked as outdated.


<Link
className={cn(buttonVariants({variant:"outline",size:"sm"}),"gap-2 mt-2")}
href={`https://docs.stack-auth.com/docs/next/concepts/auth-providers/${props.id}`}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The documentation URL construction will generate a broken link for the X/Twitter provider because the provider ID is "x" but the documentation file is named "x-twitter.mdx".

View Details
📝 Patch Details
diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsxindex fc756024..80faf844 100644--- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx+++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx@@ -47,6 +47,12 @@ function toTitle(id: string) {   }[id]; }+function toDocumentationSlug(id: string) {+  return {+    x: "x-twitter",+  }[id] || id;+}+ export const providerFormSchema = yupObject({   shared: yupBoolean().defined(),   clientId: yupString()@@ -177,7 +183,7 @@ export function ProviderSettingDialog(props: Props & { open: boolean, onClose: (            <Link             className={cn(buttonVariants({ variant: "outline", size: "sm" }), "gap-2 mt-2")}-            href={`https://docs.stack-auth.com/docs/next/concepts/auth-providers/${props.id}`}+            href={`https://docs.stack-auth.com/docs/next/concepts/auth-providers/${toDocumentationSlug(props.id)}`}             rel="noreferrer"           >             See full documentation

Analysis

X/Twitter provider documentation URL generates 404 error

What fails: ProviderSettingDialog inapps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx constructs documentation URLs using provider ID "x", but the actual documentation file is "x-twitter.mdx"

How to reproduce:

  1. Open Stack Auth dashboard
  2. Navigate to auth methods for any project
  3. Click on X (Twitter) provider
  4. Click "See full documentation" button

Result: Redirects tohttps://docs.stack-auth.com/docs/next/concepts/auth-providers/x which shows "Loading..." and redirects to home page (404 behavior with meta refresh)

Expected: Should navigate tohttps://docs.stack-auth.com/docs/next/concepts/auth-providers/x-twitter which contains the properX (Twitter) OAuth setup documentation

Comment on lines +178 to +185
<Link
className={cn(buttonVariants({variant:"outline",size:"sm"}),"gap-2 mt-2")}
href={`https://docs.stack-auth.com/docs/next/concepts/auth-providers/${props.id}`}
target="_blank"rel="noreferrer"
>
See full documentation
<ArrowRightsize={16}/>
</Link>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
<Link
className={cn(buttonVariants({variant:"outline",size:"sm"}),"gap-2 mt-2")}
href={`https://docs.stack-auth.com/docs/next/concepts/auth-providers/${props.id}`}
target="_blank"rel="noreferrer"
>
Seefulldocumentation
<ArrowRightsize={16}/>
</Link>
<a
className={cn(buttonVariants({variant:"outline",size:"sm"}),"gap-2 mt-2")}
href={`https://docs.stack-auth.com/docs/next/concepts/auth-providers/${props.id}`}
target="_blank"rel="noreferrer"
>
Seefulldocumentation
<ArrowRightsize={16}/>
</a>

TheLink component doesn't support therel prop in its TypeScript interface, causing a compilation error when trying to userel="noreferrer".

View Details

Analysis

TypeScript compilation error: Link component missing rel prop

What fails: Custom Link component in@/components/link doesn't includerel in its TypeScript interface, causing compilation error when usingrel="noreferrer"

How to reproduce:

cd apps/dashboardpnpm run typecheck# Error: "Property 'rel' does not exist on type 'LinkProps'"

Result: TypeScript compilation fails with error on line 181 ofproviders.tsx

Expected: Should compile successfully asrel is a standard HTML anchor attribute for external links perMDN documentation

Fix applied: Replaced customLink with native<a> tag to match codebase pattern - all other external links withrel attributes use<a> tags, not the customLink component

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vercelvercel[bot]vercel[bot] left review comments

@ellipsis-devellipsis-dev[bot]ellipsis-dev[bot] left review comments

@coderabbitaicoderabbitai[bot]coderabbitai[bot] left review comments

@cursorcursor[bot]cursor[bot] left review comments

@N2D4N2D4N2D4 approved these changes

+1 more reviewer

@greptile-appsgreptile-apps[bot]greptile-apps[bot] left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

@fomalhautbfomalhautb

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@fomalhautb@N2D4

[8]ページ先頭

©2009-2025 Movatter.jp