Skip to content

Commit

Permalink
Set fallback values for user created via ID token (#3467)
Browse files Browse the repository at this point in the history
Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
  • Loading branch information
fraxachun and johnnyomair authored Feb 20, 2025
1 parent faa54eb commit e6f9641
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-bees-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cms-api": patch
---

Add fallback values for users created via ID token
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export class UserPermissionsService {
if (!idToken.sub) throw new Error("JwtPayload does not contain sub.");
return {
id: idToken.sub,
name: idToken.name,
email: idToken.email,
name: idToken.name || "Unknown User",
email: idToken.email || "",
};
}

Expand Down

0 comments on commit e6f9641

Please sign in to comment.