Is 3-legged Twitter Oauth supported? #2863
-
I was just checking if I should use I am using a library called https://github.com/PLhery/node-twitter-api-v2 I was wondering if it is supported & what are the benefits of using this one over that one? I think that one gives more control & this one is more easier but would love to hear what you think? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
I think this is what we are already doing with https://next-auth.js.org/providers/twitter |
Beta Was this translation helpful? Give feedback.
-
I just tried doing it but I think it's really different. Would love to be wrong so lmk if it's possible (or maybe we can expect it as a feature in a future release 😉) |
Beta Was this translation helpful? Give feedback.
-
It works pretty well. Had a minor glitch figuring out custom signin pages as I thought of using I did manage to make my code extremely small by offloading auth to next-auth. ~800 LOCs replaced with ~100 LOCs. See this commit. This is the complete code on If you are logged in, it'll show the app in the root route |
Beta Was this translation helpful? Give feedback.
It works pretty well. Had a minor glitch figuring out custom signin pages as I thought of using
Link
with customhref
orbutton
with customfetch
but it turns out usinggetProviders
ingetServerSideProps
was the way.I did manage to make my code extremely small by offloading auth to next-auth. ~800 LOCs replaced with ~100 LOCs. See this commit.
This is the complete code on
next-auth
branch → https://github.com/deadcoder0904/twitter-api-v2-3-legged-login-using-next-connect/tree/next-authIf you are logged in, it'll show the app in the root route
/
. If you are logged out, it will show login button on the same root route/
.