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

Authenticate media requests when loading avatars #2856

Open
wants to merge 4 commits into
base: livekit
Choose a base branch
from

Conversation

Half-Shot
Copy link
Member

Fixes #2845

This introduces support for authenticated matrix media for avatars. All media requests are now made via fetch and then the result is stored as a local object url.

Copy link
Member

@hughns hughns left a comment

Choose a reason for hiding this comment

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

What is the intended behaviour when EC is running as a widget?

@Half-Shot
Copy link
Member Author

Half-Shot commented Dec 2, 2024

What is the intended behaviour when EC is running as a widget?

😢 , I suspect. There isn't an API presently to fetch media over the widget API and we don't have a token to use that could do it. I wish for a world where we get scoped OIDC tokens and can just use the actual API. matrix-org/matrix-widget-api#115 would be useful.

I think for the moment we could either still support unauthenticated media for widgets while new avatars slowly replace the old ones and we lose access to them. Or we could just show placeholders for all avatars until we can properly support authenticated media.

@hughns
Copy link
Member

hughns commented Dec 2, 2024

What is the intended behaviour when EC is running as a widget?

😢 , I suspect. There isn't an API presently to fetch media over the widget API and we don't have a token to use that could do it. I wish for a world where we get scoped OIDC tokens and can just use the actual API. matrix-org/matrix-widget-api#115 would be useful.

I think for the moment we could either still support unauthenticated media for widgets while new avatars slowly replace the old ones and we lose access to them. Or we could just show placeholders for all avatars until we can properly support authenticated media.

If the PR can be updated to make it work with the widget mode fallback (with appropriate tests too), then I think we could merge this PR without having to figure out the whole widget API solution.

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.

Support for authenticated media / profile pictures fail to load
2 participants