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

Add avatar_src to the Panoptes JWT #4217

Open
eatyourgreens opened this issue Jun 23, 2023 · 4 comments
Open

Add avatar_src to the Panoptes JWT #4217

eatyourgreens opened this issue Jun 23, 2023 · 4 comments

Comments

@eatyourgreens
Copy link
Contributor

Can we add avatar_src to the encoded payload of our web tokens, so that the front-end doesn't have to make an API request to get the URL for the user avatar?

Related front-end PR: zooniverse/front-end-monorepo#4803

@eatyourgreens
Copy link
Contributor Author

eatyourgreens commented Jun 23, 2023

If it's as straightforward as adding avatar: user.avatar_src here, then I can open a PR.

{
data: {
id: user.id,
login: user.login,
dname: user.display_name,
scope: opts[:scopes].to_a,
admin: user.is_admin?
},

@eatyourgreens
Copy link
Contributor Author

I’m not sure about that previous comment, because avatar_src is added by the User serialiser.

@eatyourgreens
Copy link
Contributor Author

eatyourgreens commented Oct 15, 2023

This has come up while adding auth to the new Next.js app (zooniverse/front-end-monorepo#5459.) When we get a user from the Panoptes JWT, we don’t get the user avatar URL.

@mcbouslog
Copy link

This would also be helpful for the user stats and logged in homepage.

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

No branches or pull requests

2 participants