Next Auth Session
I want to use useSession() I want the callback to do a check on the url it is coming from (req.headers.host is ideal); however, I cannot access this information in the callback function.
A possible solution I have explored is to go to
/api/auth/[...nextauth].ts
and override it from there however the problem with this is that whenever I am making trpc requests I have to also manually override that one which makes me repeat unnecessary code. I was just wondering if there is a better way to go about this.
The part of the code I am referring to for the callbacks is the following:
Thank you in advance.0 Replies