'Verification URL for Discord JS

Would it be possible to create a one-click URL verification system in Discord JS. Essentially, when you signup for my service you get an email with a verification URL that when clicked adds you to the discord server, gives you the appropriate role, and adds you to my Mongoose database. I've seen this kind of system done for regular applications, but never through discord.



Solution 1:[1]

You can make use of the discord OAUTH2 system to gain access to add the user to guilds automatically. You can create a 2 stepped system first it would verify the user in the local database and then redirect them to the generated OAUTH2 URL https://discord.com/developers/docs/topics/oauth2 enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Arnav Mishra