mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-04-25 22:05:51 +03:00
[PR #688] [MERGED] feat(oauth2): add default role assignment for new OAuth2 users #702
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cloudflare_temp_email#702
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/688
Author: @dreamhunter2333
Created: 7/14/2025
Status: ✅ Merged
Merged: 7/14/2025
Merged by: @dreamhunter2333
Base:
main← Head:feature/dev📝 Commits (1)
718472dfeat(oauth2): add default role assignment for new OAuth2 users📊 Changes
2 files changed (+17 additions, -1 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
worker/src/user_api/oauth2.ts(+16 -1)📄 Description
User description
#687
PR Type
Bug fix, Enhancement
Description
Assign default roles to new OAuth2 users during registration.
Validate the existence of the default role before assignment.
Prevent duplicate role assignments using
ON CONFLICT DO NOTHING.Improve error handling for role assignment failures.
Changes walkthrough 📝
oauth2.ts
Implement default role assignment in OAuth2 flowworker/src/user_api/oauth2.ts
ON CONFLICT DO NOTHINGto avoid duplicate role entries.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.