Skip to content

Oauth provider client #772

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

Draft
wants to merge 48 commits into
base: dev
Choose a base branch
from
Draft

Oauth provider client #772

wants to merge 48 commits into from

Conversation

fomalhautb
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Jul 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stack-backend ❌ Failed (Inspect) Jul 16, 2025 8:32pm
stack-dashboard ❌ Failed (Inspect) Jul 16, 2025 8:32pm
stack-demo ❌ Failed (Inspect) Jul 16, 2025 8:32pm
stack-docs ❌ Failed (Inspect) Jul 16, 2025 8:32pm

Copy link

recurseml bot commented Jul 16, 2025

✨ 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

⚠️ Only 5 files were analyzed due to processing limits.

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

Copy link

patched-codes bot commented Jul 16, 2025

Documentation Changes Required

  1. docs/templates/sdk/objects/stack-app.mdx

    • Add documentation for the new createOAuthProvider method in the StackServerApp interface.
    • Include method signature, description, parameter documentation, return type details, and example usage.
    • Place this in either the "User Management" section after the createUser method or in a new "OAuth Management" section.
  2. docs/templates/sdk/types/user.mdx

    • Update the ClickableTableOfContents to include:
      • listOAuthProviders(): Promise<OAuthProvider[]>
      • useOAuthProviders(): OAuthProvider[]
      • getOAuthProvider(id): Promise<OAuthProvider | null>
      • useOAuthProvider(id): OAuthProvider | null
    • Add new CollapsibleTypesSection components for:
      • OAuthProvider and ServerOAuthProvider types with their properties
      • listOAuthProviders() and useOAuthProviders() methods
      • getOAuthProvider() and useOAuthProvider() methods
    • Include examples, parameter documentation, and return type information for each method.
    • Update both CurrentUser and ServerUser sections to include the new OAuth provider capabilities.

Please ensure these changes are reflected in the relevant documentation files. Follow the existing documentation patterns for consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants