authgear / authgear/authgear-server
Webhook event returns admin_api in triggered_by field for actions performed in Portal
- Dominant language
- Go
- Stars
- 2k
- Forks
- 125
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 32
Description
I tried working with Authgear webhooks recently and I made the following observation:
Although, [this file](https://github.com/authgear/authgear-server/blob/a786b95a4486a2979b1fc209bd86ab9a1690ba49/pkg/api/event/context.go#L17-L26) contains the `system` and `portal` as source of event (`triggered_by`), while testing some webhooks, I got the old `admin_api` as source for events like adding and deleting a user via the Portal.
I was expecting `triggered_by: 'portal'`
@louischan @tung2744
Contributor guide
Research direction
Start with pkg/api/event/context.go, especially the source definitions linked in the issue, then trace the webhook events emitted when users are added or deleted through the Portal. Confirm why those events still report admin_api and update the event source so Portal actions report portal; verify both event cases produce the expected triggered_by value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication, backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100