-
Notifications
You must be signed in to change notification settings - Fork 32
Description
It'd be a really nice integration with Better-Auth, if we added a column for each user to store their current subscription status.
To give more context, in my website, I wanted to check the subscription status of the current signed in user, but not have to hit the Polar API for each request (why hit the Polar API when I already have access to my own DB).
So, what I did was add an additionalField to each of my users, and use the webhook events to change the subscription status of the user whenever the subscription changed:
This seems like it will work pretty well and reduce dependence on hitting the polar API for each one of my requests.
So, for the better-auth polar adapter, I think it would be great to add a new column for users which is a JSON.stringify'd version of the current subscription details. Then it would make it easy to access the current subscription state, rather than hitting the Polar API for it.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status