Hi! I'm building an app where users authenticate via Discord. For login, they enter their email and receive an OTP via Discord DM from our bot. For sign-up, they enter their info (name, email, DOB) and then verify their account by DMing our bot a code.
Is it possible to use better-auth to manage sessions and user creation in this flow, while handling the Discord OTP and verification logic externally (e.g., through custom API routes)? Or would I need to write a custom provider or adapter to integrate this flow properly?
Any advice on the best way to hook into better-auth for this type of setup would be appreciated!
Frontend : Next.js, socket.io-client
If better auth isn't suitable would my best bet to build a custom auth infrastructure for this ?