OpenFn / OpenFn/lightning

With expired Github token an "refresh page or contact support" error appears

Open
#4,779 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs detail
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

Impact

Users cannot create new Github connections if their tokens have expired. (There is a workaround that can be provided by contacting support@openfn.org, but we should do better than that!)

Reproduction

When a user's personal GitHub token has expired (like this)

%{
  "access_token" => "shh!",
  "expires_at" => "2026-03-24T18:09:32.334729Z", # i am expired!
  "expires_in" => 28800,
  "refresh_token" => "shh!",
  "refresh_token_expires_at" => "2026-09-24T10:09:32.334818Z",
  "refresh_token_expires_in" => 15897600,
  "scope" => "",
  "token_type" => "bearer"
}

And they try to set up a new GitHub Repo Connection they see this error:

Image

They're stuck, and there's nothing they can do but contact support. OpenFn's support team then tells them to go here and disconnect from GitHub, then reconnect to GitHub:

Image

There is an unhandled error (https://openfn.sentry.io/issues/7494763373/?alert_rule_id=11218001&alert_type=issue&environment=prod&notification_uuid=dd1ee600-7d28-47ed-9be3-572026e6b20b&project=6446500) when they click disconnect, but once the disconnection is done and the reconnect, they get a new token and everything works perfectly.

Possible Solutions:

  1. (OK? ⭐ ) Tell them why Github connection creation is broken. With an "expired token" message they might be able to figure out how to fix it.
  2. (Better? ⭐ ⭐ ) Tell them how to fix it.
  3. (Best? ⭐ ⭐ ⭐ ) Give them a button on the page with the error to "refresh" their GitHub connection
  4. (Bester?) [ add new ideas here ]

Version

v2.16.4 (1.5.83)

Contributor guide

No contributing guide indexed for this repository

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

No file or test is named. Start with the GitHub Repo Connection creation flow and the disconnect/reconnect flow described in the reproduction, then trace how an expired token is handled; done means users receive a useful recovery path instead of the generic error and can create a connection successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir, github
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.