-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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: When GCal OAuth Canceled, Do Not Create A Credential #11987
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes! |
const token = await oAuth2Client.getToken(code); | ||
key = token.res?.data; | ||
} | ||
|
||
await prisma.credential.create({ | ||
data: { | ||
type: "google_calendar", | ||
key, | ||
userId: req.session.user.id, | ||
appId: "google-calendar", | ||
}, | ||
}); | ||
await prisma.credential.create({ | ||
data: { | ||
type: "google_calendar", | ||
key, | ||
userId: req.session.user.id, | ||
appId: "google-calendar", | ||
}, | ||
}); | ||
} |
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.
Added safety of only creating the credential if the code is valid
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 162 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 10/19/2023 01:15:46am UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 1e85a8f Started: 10/19/2023 01:13:23am UTC
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Stripe integration When event is paid and confirmed Paid and confirmed booking should be able to be rescheduled
Retry 1 • Initial Attempt |
0.75% (2)2 / 266 runsfailed over last 7 days |
3.01% (8)8 / 266 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 2 Flakes
Top 1 Common Error Messages
|
2 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
8.27% (23)23 / 278 runsfailed over last 7 days |
89.93% (250)250 / 278 runsflaked over last 7 days |
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1 • Initial Attempt |
3.58% (10)10 / 279 runsfailed over last 7 days |
35.84% (100)100 / 279 runsflaked over last 7 days |
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.
What does this PR do?
This PR throws the correct error when a user cancels the OAuth flow when connecting GCal. While the error handling could be improved this will prevent errors for now and keeps our error handling consistent.
https://www.loom.com/share/b8412b0e6a134979afbc2d3e3015dde1
Fixes # (issue)
Requirement/Documentation
Type of change
How should this be tested?
Mandatory Tasks
Checklist