-
Notifications
You must be signed in to change notification settings - Fork 3.2k
improvement(salesforce): fixed refresh and added endpoints #2177
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryFixed Salesforce token refresh logic by adding a database hook that sets a default 2-hour expiration for tokens (since Salesforce doesn't return
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant Auth
participant DB
participant SF
User->>Auth: Login via OAuth
Auth->>SF: Authenticate user
SF-->>Auth: Provide access (no expires_in)
Auth->>DB: Create Account
Note over DB: Hook sets 2hr expiration
DB-->>Auth: Account Ready
Auth-->>User: Login Success
Note over User,SF: Refresh Flow
User->>Auth: API Call
Auth->>Auth: Check Expiration
Auth->>SF: Refresh access
SF-->>Auth: Provide new access
Auth->>DB: Update (2hr expiration)
Auth-->>User: Success
|
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.
9 files reviewed, 1 comment
Summary
Added more salesforce endpoints. Changed refresh token logic bc salesforce doesn't return
expires_inin their token response, but their documentation explains how the token expires in 2 hours. so we have a function that has a default expiration of two hours for salesforce specifically.Fixes #(issue)
Type of Change
Testing
Tested manually
Checklist