Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add an admin API to lock/unlock an account #3941

Open
3 of 5 tasks
drev74 opened this issue Jun 1, 2024 · 3 comments
Open
3 of 5 tasks

feat: add an admin API to lock/unlock an account #3941

drev74 opened this issue Jun 1, 2024 · 3 comments
Labels
feat New feature or request.

Comments

@drev74
Copy link

drev74 commented Jun 1, 2024

Preflight checklist

Ory Network Project

No response

Describe your problem

I need to programmatically lock/unlock a user account. This is a normal practice in multiuser system. Then admin or support unlocks the account after user request

Describe your ideal solution

  1. Add a a boolean field locked into table identities
  2. Add two admin methods to lock/unlock the identity by setting/clearing this field

Workarounds or alternatives

I see another field called active. It is used to describe a state and prevent login before confirming email. This could be used to add a state = locked, but I still prefer to add a new boolean field locked.

Version

master

Additional Context

No response

@drev74 drev74 added the feat New feature or request. label Jun 1, 2024
@alnr
Copy link
Contributor

alnr commented Jul 1, 2024

The active field is what you are looking for I think. Have you tried it?

@drev74
Copy link
Author

drev74 commented Jul 10, 2024

active becomes true after email confirmation. If I block a user, how do you distinguish between a blocked and unconfirmed accounts ?

@cm-sentinel
Copy link

active becomes true after email confirmation. If I block a user, how do you distinguish between a blocked and unconfirmed accounts ?

It sounds like this would require active to refactor from a bool to an enum of states. Correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

3 participants