SignIn discord user if he is on a certain Server
Hi im wondering if there is a way in NextAuth to sign user only if they are on a specific server otherswise redirect them to signin page
4 Replies
you can use the signin callback in the nextauth options to achieve this
Next auth is shit at this, you'd need to query your db to get said account from the Account table, in there you need to get the access_token, which you need to use to get the bearer_token which you then can use to use the discord api
You'd have to implement this yourself
It's doable with nextauth but sounds annoying lol
yea that what i did
looks horrible but it works
ikr, sometimes you cant help it but hack your way through