Skip to content
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

Remove claim for Discord avatar #585

Merged

Conversation

martincostello
Copy link
Member

@martincostello martincostello commented Aug 5, 2021

Rather than maintain logic to understand how Discord builds up avatar URLs and handles different image formats, this PR removes the computed "avatar URL" claim for the v6 release while we have the opportunity to make breaking changes.

Consumers can instead author their own MapCustomJson(...) on the ClaimActions and derive the URI based on their own requirements.

As this is pretty easy to do using the extensibility that already exists, I think this is a long-term more preferable and maintainable solution than us trying to keep in step with whatever it is that Discord is doing for their avatar image storage.

If we decide this is the route we want to go down, I'll add an example implementation that mirrors what previous versions did with a tweak to support the animated case into the Markdown document. Users can then copy-paste that into their app configuration if they need it.

We could also optionally add [Obsolete] to these properties in the dev branch for v5 to give some advance notice to it being removed in v6.

Relates to #584.

@martincostello martincostello added this to the 6.0.0 milestone Aug 5, 2021
@martincostello martincostello self-assigned this Aug 21, 2021
Copy link
Member

@kevinchalet kevinchalet left a comment

Choose a reason for hiding this comment

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

Sounds like the most reasonable approach 👍🏻

Rather than maintain logic to understand how Discord builds up avatar URLs and handles different image format, remove the computed "avatar URL" claim.
Consumers can instead author their own MapCustomJson on the ClaimActions and derive the location based on their own requirements.
Add some sample code to the documentation showing how to map the user's avatar URL to a claim.
@martincostello martincostello force-pushed the Fix-Discord-Avatars-584 branch from 975f5ae to 9470bbe Compare August 25, 2021 16:16
Turns out # links don't work in Markdown docs.
@martincostello martincostello merged commit 128a470 into aspnet-contrib:dev-6.0.0 Aug 25, 2021
@martincostello martincostello deleted the Fix-Discord-Avatars-584 branch August 25, 2021 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants