Skip to content

Commit

Permalink
feat(clerk-js): Session touch should include the active organization
Browse files Browse the repository at this point in the history
When we do a session touch, we should include
the active orgnization id if there is one.

This ensures that when we move from tab to tab
where each tab has the same session but different
organizations, each tab keeps the correct active
organization.

https://www.notion.so/clerkdev/Touch-should-optionally-send-the-active-organization-id-for-the-session-7c09a378022841c5967b5d06a0be5213
  • Loading branch information
alex-ntousias committed May 16, 2022
1 parent b07167f commit 664030c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/clerk-js/src/core/resources/Session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class Session extends BaseResource implements SessionResource {
touch = (): Promise<SessionResource> => {
return this._basePost({
action: 'touch',
body: { active_organization_id: this.lastActiveOrganizationId },
});
};

Expand Down

0 comments on commit 664030c

Please sign in to comment.