TanStack / TanStack/router

Update session not called in WorkOs sample

Open
#5,021 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

examples start
Dominant language
TypeScript
Stars
15.1k
Forks
1.9k
Avg merge
1d 20h
Merged PRs (30d)
143

Description

Which project does this relate to?

Start

Describe the bug

Based upon the WorkOS sample, there is a bug where updateSession is never called, hence when the initial token time expires, it's never refreshed with a refresh token.

Your Example Website or App

https://github.com/tanstack/router/tree/main/examples/react/start-workos

Steps to Reproduce the Bug or Issue

updateSession call in the session.ts never called.

Expected behavior

When checking for auth, it should check for valid session and refresh.

@nicknisi as maker of the sample can you elaborate how this should work with refreshing the tokens?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in examples/react/start-workos/session.ts and trace the authentication check to see why updateSession is never called. Verify the session is checked and refreshed when the initial token expires, then test the WorkOS sample flow to confirm refresh behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
authentication, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.