logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.32k stars 406 forks source link

feature request: Ability to notify users of permission changes #5099

Open msmarks opened 9 months ago

msmarks commented 9 months ago

What problem did you meet?

We are using Meteor.js to build realtime App. In Meteor's world, every client subscribe the change of data, and not need to active pull the data.

If the user's permissions are modified in the Logto backend, the real-time application must immediately respond on the UI. At present, we have achieved this goals through PostgreSQL row level triggers and Notify mechanism. When the application receives notification of changes to table rows such as users table and roles table in Postgres, it use M2M to pull user permission information.

Describe what you'd like Logto to have

Considering the potential changes in table structure that may arise from future logo upgrades, it is best for Togto to have an official mechanism to notify the application that a user's permissions have changed. The current webhook does not support it yet.

A notification mechanism may require:

  1. Custom register an url address in Logto and call it when their permissions change.

  2. If the custom address is not online when logto calling, the logto needs to cache a portion of the message and retry periodically.

  3. If the cache is full, the logo needs to be notified the cache full message the next time the custom address is online, and custom system will active pull all missed user permissions.

wangsijie commented 9 months ago

Hi @msmarks, thanks for report, Logto has the feature of "WebHooks". But so far missing the permission change event, I want to know if it can solve your problem if an event like "permission change" is added?

msmarks commented 9 months ago

@wangsijie Yes, it would be great if could provide "permission change" event.

msmarks commented 9 months ago

@wangsijie maybe a general user change event is needed, including premission, user profile, user removed. when applications receive the event, it will sync the user info with logto.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

wangsijie commented 8 months ago

This feature is not an easy one, and may require some time to be scheduled.

msmarks commented 8 months ago

@wangsijie Thank you for the evaluation. I hope to achieve it someday.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.