Next.js Discord

Discord Forum

NextAuth + Stripe

Answered
Sloth bear posted this in #help-forum
Open in Discord
Avatar
Sloth bearOP
Hello ! There is someone who know a tuto to install NextAuth and make Stripe subscriptions in a site with the last versions.
Answered by B33fb0n3
you should handle both independendly. First create your auth so users can auth themself and after that integrate stripe customers. Bind a customerId to your auth session and then do with stripe whatever you like to do: payments, subscriptions, ...

So make sure to create your auth first and then apply stuff from stripe to it, after it
View full answer

6 Replies

Avatar
you should handle both independendly. First create your auth so users can auth themself and after that integrate stripe customers. Bind a customerId to your auth session and then do with stripe whatever you like to do: payments, subscriptions, ...

So make sure to create your auth first and then apply stuff from stripe to it, after it
Answer
Avatar
@Sloth bear solved?
Avatar
Sloth bearOP
Thank you, I was doing the both dependendly it's why it was not working.
You advice to use the v4 of nextauth or the last version v5 ?
Avatar
maybe I am looking at the wrong place, but I guess v4 is the latest version 🙂

Authjs and next-auth beta is in my opinion to buggy
Image
Avatar
Sloth bearOP
Ok I will move to the v4