r/discordapp•
Adarnof

3rd Party Role Management

Is there any way to tie in a 3rd party application to assign users roles?

For context, I'm working on an authentication system for EVE Online which checks membership of characters, and if they're part of an in-game corporation, generates credentials on varying services (TS3, mumble, openfire, etc) and assigns groups. I've had requests to integrate with Discord.

My origin plan was to generate a user account for people through the auth system and provide them the username/pass, this way the application could login via REST API and edit their roles (I assume roles are the equivalent to groups). As far as I can tell there's no way to edit a user's role without authenticating as them.

Unfortunately I don't see an endpoint to create accounts, and this would be vulnerable to them changing passwords through the website.

My next thought was to create a channel bot which would listen for codes generated through the auth system and then assign groups that way. I'm struggling with the discord.py library but making progress.

Anyone have experience with anything of the sort? Am I on the right track?

Posted Nov 30, 2015, 5:27 AM UTC

33

I think the ideal solution would be for Discord to provide Oauth. From inside your auth portal they could just click a 'log in with discord' button, stick in their creds, and now your auth system can access their username and set up their role.

Pasting a code to a bot would work. Wouldn't be the dumbest thing an eve corp has made me do to get onto their services. One thing to consider with discord though are the temp accounts when you log in from the web browser. AFAIK there's no way to tell if somebody has registered their account or not, so your users could unknowingly open a serious security hole by authenticating with you but not claiming their discord username, allowing the ever-present spies to claim it instead.

Nice to see eve people looking at discord. It seems like an ideal solution considering how annoying jabber/xmpp can be to work with at times. One thing that I know will hold larger alliances back are the lack of cross-channel communication and in general, feature parity to mumble's ACLs and ts3's permissions that let them do some really funky things in multiple-fleet scenarios.

2
AdarnofOP•

Oauth would definitely make this a lot easier. Fingers crossed it gets added.

Account registration is a valid concern. I guess onus would be on members not to be dumb, but I know that's a big leap of faith :P

There's a few situations where the typical services excel, but for lots of the smaller groups things like Discord and Slack are becoming much more popular for their simplicity.

1
AdarnofOP•

Update: I can intermittently make the /api/auth/register endpoint accept additional info: email and password. Using this I've registered a few user accounts with my auth system, and they've received account verification emails. Unfortunately it seems you can't re-use email addresses which is an issue.

1