authgear / authgear/authgear-server

Hook for role management

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

Description

## Problem

For backends just like mine which get their user table updated via an Authgear webhook, having an event fired when a user role gets added or deleted would be much nicer, since the webhook can already update the user's info but not their "permissions".

## Appetite

It's pretty simple, just fire a Hook event, just like the other ones.

## Solution

Either one of the two:
- Adding two events: `user.roles.added` and `user.roles.deleted`
- Simply fire the `user.profile.updated` event with the roles in it.

## Success definition

Self-explanatory.

## Rabbit holes

Non-existent.

## No-goes

N/A.

Thanks!!

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests. Start by tracing the existing Hook events and the user profile update path, then compare how role additions and deletions are represented. Done means role changes reliably produce the agreed Hook event and the webhook receives the updated permissions information.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authorization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.