authgear / authgear/authgear-server

`user.profile.updated` is not fired when email/phone/username is updated

Open
#4,144 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2k
Forks
125
Avg merge
2d 17h
Merged PRs (30d)
32

Description

## Problem

In our current design when email/phone/username is updated,
although the profile may be updated, the `user.profile.updated` is not fired, because we decided to avoid more than 1 event being fired, as `identity.updated` was already fired.

This is counter-intuitive for the developers because:

* they usually treat email, phone number, username part of the profile, not much different from the rest of the profile.
* The identity can change the profile or not change it, depends on which email/phone number was chosen to be the **primary email / primary phone number** . The developers cannot rely on `identity.updated` to ensure they got the up-to-date primary email/phone number

## Solution

Pending discussion

## Rabbit hole

`user.profile_pre_update` & `user.profile.updated` both need to be updated

Contributor guide

Open the contributing guide

Research direction

The solution is still pending discussion, and no implementation files or tests are named. Start by reviewing the existing behavior of `identity.updated`, `user.profile_pre_update`, and `user.profile.updated`, then resolve the intended event semantics with the maintainers. Done means the agreed behavior is implemented consistently for email, phone, and username changes, including the two named profile hooks.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, authentication
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.