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

List users endpoint with filtering, pagination #242

Open
Tracked by #153
dallashuggins opened this issue Jan 26, 2022 · 4 comments
Open
Tracked by #153

List users endpoint with filtering, pagination #242

dallashuggins opened this issue Jan 26, 2022 · 4 comments
Labels
backend Backend work frontend Front end work

Comments

@dallashuggins
Copy link
Contributor

dallashuggins commented Jan 26, 2022

Add endpoint for listing Firebase users in the admin portion of the application. Needs to support pagination and filtering for the users table. This endpoint will exist in the front-end API, since this is where Firebase admin is used.

@dallashuggins dallashuggins mentioned this issue Jan 26, 2022
6 tasks
@dallashuggins dallashuggins added backend Backend work frontend Front end work labels Jan 26, 2022
@lefnire
Copy link
Contributor

lefnire commented Feb 24, 2022

@dallashuggins for adding a user, how do we want to handle stuff that'd normally be input by the user? Eg password & passphrase? I'm thinking password could be the typical temporary->user-update workflow, but is passphrase a 1-time set?

@dallashuggins
Copy link
Contributor Author

@lefnire Aw right, great point. I totally forgot about this aspect, and remember now why pagination and filtering was important. It may actually make sense to search through users by email, and then assign/revoke permissions, vs creating the user where we they would have to share that sensitive information. The passphrase is only set once and cannot be reset yet, so that works much better. Sorry for the misleading comments! Remembering there is one complication there too, as Firebase Admin doesn't allow for easy filtering through the list of users, so we'll need to search based on the exact email or phone number.

@lefnire
Copy link
Contributor

lefnire commented Feb 25, 2022

To verify: no create-user feature here then (to avoid admin needing passphrase)?

as Firebase Admin doesn't allow for easy filtering through the list of users, so we'll need to search based on the exact email or phone number.

Username & email are stored in api/UserAccount as well, we could ILIKE. Not phone though, do we indeed want the search against Firebase users, not UserAccounts?

@dallashuggins
Copy link
Contributor Author

@lefnire Yeah, I think that makes the most sense. Oh great call! I hadn't thought about sorting through the users table actually, but there should always be a Firebase account associated, so that would work perfectly. 🙌

lefnire added a commit that referenced this issue Mar 25, 2022
* admin/users table with update-claims, currently only check-box on existing roles (#242)

* admin/users add username/email search (#242)

* admin/users axios fixes

* admin/users review fixes

* admin/users add getServerSideProps back; ky v axios fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend work frontend Front end work
Projects
None yet
Development

No branches or pull requests

2 participants