Skip to content
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

fix(oauth-ingestion): Fix 401 error (invalid credentials) during OAuth ingestion #350

Merged
merged 6 commits into from
Mar 21, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove job expiry const
kalpadhwaryu committed Mar 21, 2025
commit e4d9594650fa05d2e3025866c1844ae25d2269d5
6 changes: 1 addition & 5 deletions server/api/oauth.ts
Original file line number Diff line number Diff line change
@@ -16,8 +16,6 @@ const { JwtPayloadKey } = config

const Logger = getLogger(Subsystem.Api).child({ module: "oauth" })

const JOB_EXPIRY_HOURS = 23

interface OAuthCallbackQuery {
state: string
code: string
@@ -74,9 +72,7 @@ export const OAuthCallback = async (c: Context) => {
email: sub,
}
// Enqueue the background job within the same transaction
const jobId = await boss.send(SaaSQueue, SaasJobPayload, {
expireInHours: JOB_EXPIRY_HOURS,
})
const jobId = await boss.send(SaaSQueue, SaasJobPayload)

Logger.info(`Job ${jobId} enqueued for connection ${connector.id}`)