RocketChat / RocketChat/Rocket.Chat

setAvatarFromService failed when Accounts_AllowUserAvatarChange == false

Open
#14,776 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

When Accounts_AllowUserAvatarChange is set to false, user registration from OAuth2 has no avatar.

Steps to reproduce:
  1. A new user click OAuth2 login button
Expected behavior:

Login success
User has avatar from OAuth2 identity info

Actual behavior:

Login failed, popup shows "Not Allowed"
Login again success
User has no avatar

Server Setup Information:
  • Version of Rocket.Chat Server: 1.1.1
Relevant logs:

WebSocket log:

{"msg":"result","id":"3","error":{"isClientSafe":true,"error":"error-not-allowed","reason":"Not allowed","details":{"method":"setAvatarFromService"},"message":"Not allowed [error-not-allowed]","errorType":"Meteor.Error"}}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the setAvatarFromService method used during OAuth2 registration, with Accounts_AllowUserAvatarChange set to false, and compare the failed WebSocket call with the successful second login. Confirm that registration succeeds and the avatar from the OAuth2 identity info is retained without the error-not-allowed response.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.