-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Je/connect sdk decouple app from token #13870
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
WalkthroughThe pull request introduces enhancements to the account connection functionality within the SDK. A new parameter, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant SDK
User->>App: Initiate Account Connection
App->>SDK: Call connectAccount(oauthAppId)
SDK->>SDK: Validate oauthAppId
alt Valid oauthAppId
SDK->>App: Connection Successful
else Invalid oauthAppId
SDK->>App: ConnectError
end
Poem
Tip New featuresWalkthrough comment now includes:
Notes:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -3,7 +3,8 @@ | |||
import CodePanel from "./CodePanel"; | |||
import { useEffect, useState } from "react"; | |||
import { serverConnectTokenCreate } from "./server" | |||
import { createClient } from "@pipedream/sdk/browser" | |||
//import { createClient } from "@pipedream/sdk/browser" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to fix this before push
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/sdk/examples/next-app/app/page.tsx (1 hunks)
- packages/sdk/package.json (1 hunks)
- packages/sdk/src/browser/index.ts (3 hunks)
Files skipped from review due to trivial changes (1)
- packages/sdk/package.json
Additional comments not posted (3)
packages/sdk/examples/next-app/app/page.tsx (1)
31-31
: Approve the addition ofoauthAppId
, suggest validation.The addition of
oauthAppId
to theconnectApp
function aligns with the PR's objectives to enhance OAuth capabilities. However, consider adding validation to ensureoauthAppId
is not undefined before its usage, which will improve the robustness of the function.packages/sdk/src/browser/index.ts (2)
Line range hint
30-74
: Approve the addition ofOauthAppId
type and its usage.The new
OauthAppId
type enhances type safety and clarity, and its inclusion as a required field inStartConnectOpts
aligns with the PR's objectives to enhance OAuth capabilities. This change is well-implemented and improves the robustness of the connection process.
230-234
: Approve the handling ofoauthAppId
inconnectAccount
.The updates to the
connectAccount
method in theBrowserClient
class correctly handle and validate theoauthAppId
. The method ensures thatoauthAppId
is a string before setting it in the query parameters, enhancing the robustness and security of the connection process.
WHY
Summary by CodeRabbit
New Features
oauthAppId
parameter.oauthAppId
.Updates
0.0.8
to0.0.9
, indicating potential enhancements and bug fixes.