We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a16f24d commit 9d8926aCopy full SHA for 9d8926a
packages/cloud/src/WebAuthService.ts
@@ -707,9 +707,14 @@ export class WebAuthService extends EventEmitter<AuthServiceEvents> implements A
707
}
708
709
private async clerkGetOrganizationMemberships(): Promise<CloudOrganizationMembership[]> {
710
+ if (!this.credentials) {
711
+ this.log("[auth] Cannot get organization memberships: missing credentials")
712
+ return []
713
+ }
714
+
715
const response = await fetch(`${getClerkBaseUrl()}/v1/me/organization_memberships`, {
716
headers: {
- Authorization: `Bearer ${this.credentials!.clientToken}`,
717
+ Authorization: `Bearer ${this.credentials.clientToken}`,
718
"User-Agent": this.userAgent(),
719
},
720
signal: AbortSignal.timeout(10000),
0 commit comments