Skip to content

Added Authorize Command. #247

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

skaughtx0r
Copy link

This PR adds support for the Authorize command. I needed to be able to request additional scopes. This allows me to have the authorization prompt show up in the discord client app.

@Lachee
Copy link
Owner

Lachee commented Mar 28, 2024

Thank you for your contribution ❤
I am current unwell at the moment but will try to get to review your PR soon :)

@Lachee
Copy link
Owner

Lachee commented Apr 2, 2024

Looking great so far, just that minor tweak and it should be good to PR.
Would you be able to provide some additional information on what you can do once you have the authorized code?

@skaughtx0r
Copy link
Author

I'm using the authcode returned by the Authorize command to Authenticate with the REST API.
From there I'm hitting the https://discordapp.com/api/users/@me/guilds/{GuildID}/member for my game's discord server to see if the user has a role assigned to give them access to extra stuff in the game.

I'm not sure how to fix the issues in the static analysis. My implementation is identical to the code you already had in there for other commands, they seem like false positives.

@Lachee
Copy link
Owner

Lachee commented Apr 6, 2024

I'm using the authcode returned by the Authorize command to Authenticate with the REST API. From there I'm hitting the https://discordapp.com/api/users/@me/guilds/{GuildID}/member for my game's discord server to see if the user has a role assigned to give them access to extra stuff in the game.

I'm not sure how to fix the issues in the static analysis. My implementation is identical to the code you already had in there for other commands, they seem like false positives.

Dont worry about the static code analysis, that is just a general thumb to ensure quality and not strict.
I just need the review i posted to be resolved before I accept this PR :)

@skaughtx0r
Copy link
Author

Oh weird, I don't see any reviews:

image

Copy link
Owner

@Lachee Lachee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I seemed to hot have submitted this.
I require this to be moved up.

I do apologise, this was one of my first GitHub PRs at the time.

/// <summary>
/// The OAuth2 authorization code
/// </summary>
public string Code { get; internal set; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

properties should be defined above the contructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy