-
-
Notifications
You must be signed in to change notification settings - Fork 581
Add osu! to the list of supported providers #2403
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
gehongyan
wants to merge
12
commits into
openiddict:dev
Choose a base branch
from
gehongyan:add-osu
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+92
−13
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4c314f1
Add osu! OAuth 2.0 provider integration (#1)
Copilot 8251d3d
Fixes doc
gehongyan 496ff89
Implemented suggestions for osu!
gehongyan 41d4c0b
refactor mode to a property
gehongyan 2c5e009
Add public scope for client credentials only when no scope is explici…
gehongyan ad6d1aa
Updated GameModes class naming
gehongyan 5364bdc
Better Uri combination for user info endpoint
gehongyan 12e16d7
Merge branch 'dev' into pr/2403
kevinchalet e16ae17
Use the new ThrowIfNull()/GetValueOrDefault() polyfills
kevinchalet ff4e9cf
Merge branch 'dev' into pr/2403
kevinchalet a69c48e
Clarify why the userinfo endpoint is not statically set
kevinchalet 4982250
Update OpenIddictClientWebIntegrationHandlers.cs
kevinchalet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try something: try requesting one of the
delegate,forum.write_manageandgroup_permissionsscopes without addingpublic: if it works, it meanspublicis not strictly required but that osu requires at least one scope to be set (what OpenIddict calls "default scope").If it works without
publicbeing present, we may want to only add it if thecontext.Scopescollection is empty?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a Chat Bot account, so I cannot request
delegateor other scopes that require delegation; my personal account receives the error 'Delegation with Client Credentials is only available to chat bots.' when requesting such permissions.However, the documentation mentions: 'When using delegation, scopes that support delegation cannot be used together with scopes that do not support delegation. Delegation is only available to Chat Bots.'
This indicates that when a developer requests delegation scopes, appending
publicis incorrect, because the Scopes section points out thatpublicis not marked asCan Delegate.The source code of osu!web also confirms this:
https://github.com/ppy/osu-web/blob/c2c9404146a934bd985d40a11a5a96fda7261338/app/Models/OAuth/Token.php#L27
https://github.com/ppy/osu-web/blob/c2c9404146a934bd985d40a11a5a96fda7261338/app/Models/OAuth/Token.php#L236-L245
In a Client Credentials request, if the scopes contain elements from
SCOPES_REQUIRE_DELEGATION, all elements must be included in theSCOPES_REQUIRE_DELEGATION.Therefore, I agree with your suggestion to add
publicto thecontext.Scopesonly when it is empty.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to create an issue on the osu!web later regarding the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ppy/osu-web#12611