authgear / authgear/authgear-server

Add webhook events when user is verified

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

Description

**Problem**
Currently, the developer can check the `is_verified` flag in the user payload to identify if the user is verified. The flag will change if the user verifies through signup, login, or update login id... etc.

But if the user triggers verification from the settings or the admin marks users as verified or unverified, we don't have any webhook for that case.

**Appetite**
1-2 days

**Solution**
Suggestions for the new events
- `user.email.verified`
- `user.email.unverified`
- `user.phone.verified`
- `user.phone.unverified`

Those events should contain `user` and `identity` in the payload.

Those events are triggered only when the user trigger verification in settings page / admin mark user as verified or unverified.

If the user's login id is verified through signup / login / add login id / update login id, those events WON'T be triggered. Just like signup should not trigger `user.email.add` event.

**Rabbit holes**
Details about the solution worth calling out to avoid problems

**No-goes**
Functionality or use cases we intentionally aren’t covering to fit the appetite

Contributor guide

Open the contributing guide

Research direction

Start by locating the webhook event definitions and the verification flows for the settings page and admin actions. Trace how existing user events expose user and identity payloads. Done means the four proposed verification events are emitted for settings/admin changes, contain user and identity, and are not emitted by signup, login, or login-id changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, authentication
Issue type
Feature
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.