-
|
Hello, I've been searching for a way to implement a referral system within Next-Auth and run into some road blocks. I've searched all over online and in this community section to no avail. I was expecting to do something like this and access the referral code either in the req object in It's also a bit painful as for newly created account I need to create new database records for them. I figure out if they're a new user by looking for those records which adds latency to the auth process. I have found some talk about this here but as I commented below it doesn't seem possible. Thank you!! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
I hate to bump this but sadly I'm (and from what I can tell others) are still stuck on this :( Does anyone have any ideas? I'll keep searching and I'll update with an answer if I find it. If there's a discord or a better place to ask this let me know. Thank you! |
Beta Was this translation helpful? Give feedback.
-
|
Found the answer. Looks like you need to intercept req.query before you pass it to your next-auth. You can see a solution here. Still can't access the params in callbacks such as session but hoping this will lead to the answer |
Beta Was this translation helpful? Give feedback.
Found the answer. Looks like you need to intercept req.query before you pass it to your next-auth. You can see a solution here.
#901 (reply in thread)
Still can't access the params in callbacks such as session but hoping this will lead to the answer