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

Support Basic Account Action for Admin #849

Closed
krapie opened this issue Apr 27, 2024 · 8 comments · Fixed by #934
Closed

Support Basic Account Action for Admin #849

krapie opened this issue Apr 27, 2024 · 8 comments · Fixed by #934
Assignees
Labels
enhancement 🌟 New feature or request good first issue 🐤 Good for newcomers

Comments

@krapie
Copy link
Member

krapie commented Apr 27, 2024

What would you like to be added:

The AdminService currently only includes the SignUp and LogIn API endpoints. To enhance the functionality and provide basic account actions for administrators, additional actions such as SignOut and ChangePassword need to be implemented.

service AdminService {
  rpc SignUp(SignUpRequest) returns (SignUpResponse) {}
  rpc LogIn(LogInRequest) returns (LogInResponse) {}

  # Needs to be implemented.
  rpc SignOut(SignOutRequest) returns (SignOutResponse) {}
  rpc ChangePassword(SignOutRequest) returns (SignOutResponse) {}

Why is this needed:

Expanding the basic account actions available through the AdminService will improve the user experience and provide necessary functionality for administrative tasks.

@krapie krapie added enhancement 🌟 New feature or request good first issue 🐤 Good for newcomers labels Apr 27, 2024
@gusah009
Copy link
Contributor

Hi! I'm interested in working on this issue. Could I take on this issue?

@krapie
Copy link
Member Author

krapie commented Jul 16, 2024

@gusah009 Sure! Looks like this is a best issue to know how Golang based server works :)

@gusah009
Copy link
Contributor

Hi. I've been thinking about this issue, and I don't think I need to implement the SignOut API on the server side.
because I understand that yorkie uses JWT for authentication internally, and I think the client just needs to clear the stored token when signing out. What do you think, @krapie ?

@krapie
Copy link
Member Author

krapie commented Jul 19, 2024

@gusah009 Well I think I misused the word Sign Out. I meant Delete Account for the word Sign Out, but it seems like the word is inappropriate.

@gusah009
Copy link
Contributor

@krapie Oh, I see, SignOut is the opposite of SignIn, I misunderstood. Can I develop with DeleteAccount instead of SignOut?

@krapie
Copy link
Member Author

krapie commented Jul 19, 2024

@gusah009 It's all yours :)

@gusah009
Copy link
Contributor

@krapie I apologize in advance for any ongoing questions (_ _)

Are DeleteAccount and ChangePassword APIs targeted at me(admin)? Since they are admin APIs, it seems like I should be able to delete or change any user (even another admin account).

The reason I ask is that if it is, I want to get the password in the request and validate it, and if not, I want to do DeleteAccount or ChangePassword without validation, trusting the admin token.

@krapie
Copy link
Member Author

krapie commented Jul 19, 2024

@krapie Well, all the APIs are for the admin itself. Currently there are no "user" for admin to delete or change. So we only need to consider APIs for admin itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request good first issue 🐤 Good for newcomers
Projects
Status: Done
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants