-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Telegram as an Authentication Provider #2406
Comments
The Telegram auth isn't a classic OAuth implementation. However, you could use the credentials provider to implement a custom telegram provider. As there are no username/password provided here it would be a bit trickier to get this working. From their docs you've linked, it looks like you setup a Telegram bot for your app / company. The user clicks "login" and enters their telegram number, the bot sends them a confirmation code which they then enter in the login widget. You would have to replace the nextauth credentials login fields with the telegram login widget through a custom nextauth sign-in page, then in the Just thinking out loud here - the widget takes an argument, Unforuntately this is an extremely custom provider that we can't help much further with at the moment. NextAuth credentials provider details: https://docs-nextauthjs.vercel.app/providers/credentials |
Wow, thanks for thinking out loud on that @ndom91! So in summary, sounds like it's possible but will look different than other implementations. And thank you for linking the examples. That should suffice I think. Thanks so much! |
Hi there! It looks like this issue hasn't had any activity for a while. It will be closed if no further activity occurs. If you think your issue is still relevant, feel free to comment on it to keep it open. (Read more at #912) Thanks! |
I think there's a lot of peuple joining telegram, not providing a default implementation will lead to many custom non-working solutions, leading to a lot of issue signalling. I'd like to implement this, because I'm planning to use some features of their lib, but I think I'll struggle to notify the nextauth lib that the user logged in through telegram. I think there are a lot of other people out there with that need. Is there a way to ask how many would be interested in having this feature? |
I'd love to have this feature! Telegram has become my daily app and it'd be amazing to have Telegram authentication on websites. |
We recognize that there is probably a large amount of demand for something like this, however, Telegram doesn't seem to provide a standard OAuth type of login. This means that adding its entirely custom login behavior to NextAuth.js is a rather large undertaking. If you'd like to give it a shot, we'd happily look at a PR, but we will not be pursuing this ourselves any time soon. |
Currently bashing my head on this as it is a core part of the specs I need to meet would have loved to use my go-to toolchain in this case. If I come up with something significant I will attach a PR. Very helpful thread tho thank you. |
I would love to see more websites offering Login with Telegram, too! @passsy and I have implemented the custom login flow a few times for smaller side projects but it would be really nice to have a simple 'drop-in' solution. Especially that you can send the authenticated user notifications through Telegram makes it a really cool alternative to other providers. I've submitted a feature request on Telegram's Bugs and Suggestions page, feel free to Login with Telegram 😆 and upvote the issue here: https://bugs.telegram.org/c/23608 |
Here is an example using credentials provider, using a custom signing page https://github.com/manzoorwanijk/telegram-auth/tree/main/examples/next-auth |
Thanks for sharing, I hadn't the energy to dig into lib internals. You made my day with this :-) |
i remade it with app router and server components and added prismaJS https://github.com/TeaByte/telegram-auth-nextjs |
thank you very much! |
hello, was anyone able to get this implemented? i am looking to port this level of telegram authentication for user managemet to several other open source platforms. |
Use the following code for nextjs app router https://github.com/TeaByte/telegram-auth-nextjs |
+1 thank you |
Hello! Could you please tell me if there will be a Telegram authorization example for version next-auth ^5? |
Description 📓
As a user of
next-auth
, I would like to be able to use Telegram as an authentication provider.Links from Telegram
Note: not sure how difficult it would be to implement this, but with some guidance/suggestions, I might be able to do it myself as a contribution.
How to reproduce ☕️
N/A - not a bug to reproduce
Contributing 🙌🏽
Yes, I am willing to help implement this feature in a PR
The text was updated successfully, but these errors were encountered: