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

137 auth service functionality #207

Merged
merged 20 commits into from
Apr 2, 2024
Merged

Conversation

ganznz
Copy link
Contributor

@ganznz ganznz commented Apr 2, 2024

No description provided.

Copy link

github-actions bot commented Apr 2, 2024

Visit the preview URL for this PR (updated for commit 54d973e):

https://uasc-ceebc--pr207-137-auth-service-fun-mm73tffn.web.app

(expires Tue, 09 Apr 2024 10:09:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 36296ceaed1d43e92e7d5e81a72a7bd987560bfa

Copy link
Member

@choden-dev choden-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, also I remembered what the custom claims meant in the ticket, it was to add functionality for adding claims given a uid, I can implement this if you want a break, but its pretty similar to what you've done here

let userRecord: UserRecord
try {
userRecord = await auth.getUser(uid)
auth.setCustomUserClaims(userRecord.uid, { [role]: true })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we should have the ability to remove the claim as well

@choden-dev choden-dev linked an issue Apr 2, 2024 that may be closed by this pull request
6 tasks
@ganznz ganznz merged commit 75eccfb into master Apr 2, 2024
6 checks passed
@ganznz ganznz deleted the 137-auth-service-functionality branch April 2, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BACKEND] Add user role management functionality to auth service
2 participants