#DiscordUser Connections

1 messages · Page 1 of 1 (latest)

slate moth
#

I currently have a slashy /link, which takes a gamerTag and GameConsole to link a (Player - Guild - DiscordUser) on a DB Table.

This can create some drama where players are linking to other gamerTags other than there own.

I wish to automate this process through the use of (Connections)[https://discord.com/developers/docs/tutorials/developing-a-user-installable-app#commands-in-the-sample-project] , since the Object contains the name of the connection. The Connections in question would be for PSN (playstation) and Xbox (xbox).

My previous observations discovered this information required an OAuth token, for which I do not implement.

With the introduction of (User-Installable App's)[https://discord.com/developers/docs/tutorials/developing-a-user-installable-app], is there a way for me to use DSP.Commands to obtain this connection info?

I see Discord are using /link as an example for a User-Installable App Command. (see pic) https://discord.com/developers/docs/tutorials/developing-a-user-installable-app#commands-in-the-sample-project

Do you have any suggestions on this topic?

Discord Developer Portal

Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.

Discord Developer Portal

Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.

naive lagoon
#

Im not totally sure but i think you still have to provide an oauth2 endpoint for that. looking at the sample repo shows that they just send a message with a link for that command

slate moth
#

(╯°□°)╯︵ ┻━┻

#

Thanks Plerx, I shall have to look into a website sigh

naive lagoon
#

oh and btw we are blocking masked links for security purposes here when

slate moth
naive lagoon
#

yeah appreciate the information, just saw that you edited and wanted to provide that information in case it was an edit because of the masked links when

slate moth
frank moth
#

i believe there is an oauth provider for that, actually

naive lagoon
#

there is an package for it

frank moth
slate moth
naive lagoon
#

DSP.Rest with the user token, yeah

frank moth
#

^

#

i'm so excited for like fifty bug reports because dsp.rest is horrible but too few people use it to find the issues ioa

slate moth
#

Ahhh tytyty, isn’t using user tokens frowned upon by the gods?

frank moth
#

you register it as a bearer token

naive lagoon
#

oauth user token != user token (used by the user clients)

frank moth
#

(which is why the oauth ones are called bearer tokens)

slate moth
#

Okay, I’ll have to go to my drawing board for this.

In the mean time, I’m going to assume these tokens expire, and a user would need to login in order for me to obtain their latest connection info ( users can change their PlayStation and Xbox usernames)

naive lagoon
#

you get a refresh token where you can refresh the bearer token, those have a pretty long expiration

slate moth
#

Ty, I guess I’ll be using the “SaveTokens” property of ASP.OAuth, would this be something Discord may have an issue with?

naive lagoon
#

dont think so, as long as you have a secure storage backend for asp.identity

#

as in not public when

#

but who exposes user dbs Clueless (/ref)

frank moth
#

cough cough

#

cough.

naive lagoon
#

cough firebase incident cough