-
Notifications
You must be signed in to change notification settings - Fork 62
Authenticate members in bounty voting: Discord to xataface via OAuth #413
Comments
This isn't a change to the bounty contract, @BelovedAquila . |
So I managed to get php working, communicating, and authenticating with Discord's Oauth. I am able to grab a list of guilds that the user belongs to. However, it doesnt allow me to see the user's roles within the guild. Since we are currently identifying coop members by their roles within the guild, this specific method doesn't seem like it will work. It looks like I can set up a discord bot, give that bot access to the guild, and get a list of users and roles for the guild. So the authentication will work in 2 parts: 1) Authenticate the user with OAuth and find their unique username, 2) Ask the bot for a list of users with roles in the guild, check to see if the authorized user has the coop member role. |
Oh! I just realized: the app uses github names, primarily. So this discord stuff shouldn't be the primary login mechanism, but rather a way to set a "verified coop member" flag. |
@hyperevo are you interested to do Github OAuth too? |
Alright, Pardon. @dckc |
Even if we aren't using Discord for the primary login, we still have to have them login to their Discord account to prove it is their account. I guess it can be a one time thing, and once they are verified we can just add it to the database. Since I have already been reading OAuth documents I might as well take the github OAuth too while its fresh in my mind if nobody else wants it. |
yes, we still have to have them login to discord. |
@hyperevo you are making a point, but what method of verification is to be used to verify the discord account? Because was wondering if it should be a video verification, and since the discord verification is likely to be a ONE TIME THING like you stated, then I suggest it should be carefully and judiciously done, to ensure that no one is wrongly verified or any blur verification is made, because one wrong verification made is enough to alter the aim for a long while. Still on a suggestive grounds, making the verification on at least an annual basis wouldn't be a bad idea. |
The KYC process is separate; the results of that process go into discord roles. The task here is purely technical: access those roles. |
I fully implemented the discord Oauth coop member verification at https://github.com/hyperevo/rchain-dbr. Still in the testing phase to ensure security. Right now the user can log in via github oauth, and then verify coop membership via discord oauth. |
Your repo doesn't seem to share history with mine; it looks like you didn't start by forking / cloning. Oh well... we can clean that up in due course... |
Oops. I am fixing that now. Just realized I broke the history when I deleted xataface. I will have it all merged with the fork of your code in a few minutes. |
Fixed now. |
@hyperevo how did you set up the discord bot? What permissions? Did you "Require OAuth2 Code Grant"? |
What's up with
|
I got it almost working... |
'limit' => 1000 is not good. |
Bingo. I figured out the last of the configuration and permissions issues: had to grant MANAGE_ROLES to my bot. On March 3 I wrote:
So I fixed that in dckc/rchain-dbr@e1666f7 |
@ian-bloom all that's left is to deploy it in production; we just need you to use your bot management powers to issue us a bot token and then authorize the app on the RChain discord. I suppose that should wait until we've decided where the PHP+mysql stuff belongs, though. p.s. I found Grosh's clues useful while I was at it. |
@dckc Jeremy is setting up a Co-op hosted Docker container that you can SSH into for setup/maintenance of the PHP app and BOT. The BOT should not require "change role" permissions. Can it just query if USER_ID has member: role? In Developer Mode I @mentioned all members to reveal the following ID for the member role <@&ROLE_ID>
|
But the discord API didn't seem to work that way. But looking at it more closely, maybe it does... stay tuned. |
I think I fixed both the need for |
Thanks to @ian-bloom and @jeremybusk (and @hyperevo earlier) we are live! For details, see the updated issue description. |
In the interest of tracking membership in the bounty process (e.g. #391), let's integrate with discord, using the guild and role API.
Thanks to @hyperevo, this is implemented and deployed:
This was originally discussed in #260.
See also #279 for thoughts on using the blockchain to certify coop membership.
The text was updated successfully, but these errors were encountered: