-
-
Notifications
You must be signed in to change notification settings - Fork 6
Fix OAuth Errors and Integrate Credits Display #437
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,9 +50,10 @@ export function PurchaseCreditsPopup() { | |
| }, [user]); | ||
|
|
||
| const handleUpgrade = (tier: string) => { | ||
| // Placeholder for upgrade logic | ||
| // In a real app, this would likely redirect to Stripe Checkout | ||
| console.log(`Upgrading to ${tier}`); | ||
| // Redirect to Stripe checkout | ||
| const stripeUrl = 'https://buy.stripe.com/3cIaEX3tRcur9EM7ss'; | ||
| window.open(stripeUrl, '_blank'); | ||
| setIsOpen(false); | ||
|
Comment on lines
52
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Also, Suggestion
Example (minimal safer client-side change): const handleUpgrade = () => {
const stripeUrl = process.env.NEXT_PUBLIC_STRIPE_CHECKOUT_URL;
if (!stripeUrl) return;
window.open(stripeUrl, '_blank', 'noopener,noreferrer');
setIsOpen(false);
};Better: call Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this suggestion. |
||
| } | ||
|
|
||
| const standardTier = TIER_CONFIGS[TIERS.STANDARD]; | ||
|
|
||
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.
The error log includes a derived
codevalue (first 10 chars). Even partial authorization codes are sensitive and can end up in centralized logs (and potentially be replayable depending on provider/settings). This increases blast radius during incident triage.Also, redirecting with the raw
error.messagein the query string can leak internal/provider details to the browser history, analytics, and referrers. Consider using a generic user-facing message (and keep details server-side), or pass a short error key/correlation id instead.Suggestion
Consider removing the auth
codefrom logs entirely and avoid placingerror.messagein the redirect URL. Example:Then have the error page display a generic message and optionally show
errorIdfor support.Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this suggestion.