Next.js Discord

Discord Forum

NextAuth + Stripe

Answered
Sloth bear posted this in #help-forum
Open in Discord
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

@Sloth bear Hello ! There is someone who know a tuto to install NextAuth and make Stripe subscriptions in a site with the last versions.
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
@Sloth bear solved?
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 ?
@Sloth bear You advice to use the v4 of nextauth or the last version v5 ?
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