Skip to content

Set tables workspace selection cookie upon user signup/signin#1628

Merged
cezudas merged 3 commits intomainfrom
cezudas/OPS-3008-write-tables-group-id-cookie
Nov 18, 2025
Merged

Set tables workspace selection cookie upon user signup/signin#1628
cezudas merged 3 commits intomainfrom
cezudas/OPS-3008-write-tables-group-id-cookie

Conversation

@cezudas
Copy link
Copy Markdown
Contributor

@cezudas cezudas commented Nov 17, 2025

Part of OPS-3008.

Copilot AI review requested due to automatic review settings November 17, 2025 17:28
@linear
Copy link
Copy Markdown

linear Bot commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements functionality to set the tables workspace selection cookie (baserow_group_id) when users sign up or sign in. The changes ensure that the workspace ID is passed through the authentication flow and stored as a cookie alongside the existing authentication tokens.

Key Changes

  • Added tablesWorkspaceId field to authentication response types
  • Updated cookie handling to conditionally set baserow_group_id cookie during authentication
  • Updated cookie cleanup to remove baserow_group_id on sign out

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/shared/src/lib/authentication/dto/authentication-response.ts Added optional tablesWorkspaceId field to authentication response type
packages/server/api/src/app/authentication/context/authentication-cookies.ts Implemented conditional setting and clearing of baserow_group_id cookie
packages/server/api/src/app/authentication/basic/authentication-service.ts Populated tablesWorkspaceId field in authentication response

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/server/api/src/app/authentication/context/authentication-cookies.ts Outdated
…ion-cookies.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread packages/shared/src/lib/authentication/dto/authentication-response.ts Outdated
.send(response);
});

if (response.tablesWorkspaceId !== undefined) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The value should not be optional. We generate the tokens so we have an workspaceId

@cezudas cezudas requested a review from MarceloRGonc November 18, 2025 07:24
@sonarqubecloud
Copy link
Copy Markdown

@cezudas cezudas merged commit 27666e2 into main Nov 18, 2025
22 checks passed
@cezudas cezudas deleted the cezudas/OPS-3008-write-tables-group-id-cookie branch November 18, 2025 08:29
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.

3 participants