Skip to content

Commit 97dec4a

Browse files
authored
fix(login): send the right organizationId on login (#7162)
1 parent db8c9c3 commit 97dec4a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/cloud/backend.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ export class GrowCloudBackend extends AbstractGardenBackend {
129129
}
130130

131131
override getAuthRedirectConfig(): AuthRedirectConfig {
132+
const addOrganizationIdParam = !!this.config.organizationId ? `&organizationId=${this.config.organizationId}` : ""
132133
return {
133-
getLoginUrl: (port) => new URL(`/login?port=${port}`, this.config.cloudDomain).href,
134+
getLoginUrl: (port) => new URL(`/login?port=${port}${addOrganizationIdParam}`, this.config.cloudDomain).href,
134135
successUrl: `${new URL("/confirm-cli-auth", this.config.cloudDomain).href}?cliLoginSuccess=true`,
135136
extractAuthToken: (query) => {
136137
const token = growCloudTokenSchema.safeParse(query)

0 commit comments

Comments
 (0)