Skip to content

feat: integrate Stripe for subscription management and update schema #15

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

alfredomariamilano
Copy link

Integrated the Stripe plugin beta for better-auth.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Collaborator

@erquhart erquhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Updating subscriptions will fail currently due to lack of "OR" operator support in the adapter, I'm working on this today.

@@ -19,5 +19,5 @@ jobs:
cache: "npm"
- run: npm i
- run: npm ci
- run: cd example && npm i && cd ..
# - run: cd example && npm i && cd ..
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intentional?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because the CI completely fails, since there is no "example" directory. I guess in there there should be the generate command maybe?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, we have a bunch of examples. Need to fix this.

@@ -179,6 +179,10 @@ export const convexAdapter = (
if (!("runMutation" in ctx)) {
throw new Error("ctx is not a mutation ctx");
}
if (data.where?.[0] && !data.where?.[0]?.operator) {
data.where![0].operator = "eq";
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The adapter should use eq as default, curious if this change is addressing a failure?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have to check. I think the issue I was facing was because we weren't passing the "where" when getting a user, which would always return the oldest one, instead of the requested one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants