Skip to content

Let connector templates decide what a person opening a connect link sees - #482

Merged
tnkuehne merged 1 commit into
app-connect-returnfrom
app-connect-return-templates
Nov 29, 2026
Merged

tnkuehne merged 1 commit into
app-connect-returnfrom
app-connect-return-templates

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

A connect link no longer fails when a connector template is not set up: the template shows its own page, which tells an administrator what to set. Whoever opens the link, the template decides what they see.

A failed sign-in returns connectionError=failed to the calling page, the value the runtime uses, instead of connectionError=1. Expired-link pages and Garmin's success page no longer tell the person to return to Widefleet, since they may have come from an app.

Garmin asks for an API key on its own page. Someone without a key at hand can now choose "Cancel and go back", which returns with connectionError=failed.

The templates' results are unchanged: the runtime (previous PR) gives calling apps their own link.

Tests

  • Gmail: before setup, a connect link leads to the template's page.
  • template-oauth.test.ts: a refused provider sign-in returns to the original page with connectionError=failed.
  • Garmin: cancel link on the key page; cancel returns with connectionError=failed.
  • All template suites.

Depends on the previous PR of the stack.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs 349b5f9 Nov 29 2026, 12:43 PM

@tnkuehne
tnkuehne force-pushed the app-connect-return-templates branch 4 times, most recently from 9f49c47 to e5a1ce9 Compare November 29, 2026 09:33
@tnkuehne
tnkuehne force-pushed the app-connect-return-templates branch 2 times, most recently from 751302e to 00e256b Compare November 29, 2026 10:27
@tnkuehne
tnkuehne force-pushed the app-connect-return-templates branch from 00e256b to 05323d2 Compare November 29, 2026 10:59
@tnkuehne
tnkuehne force-pushed the app-connect-return-templates branch from e0b851f to 3edf6a7 Compare November 29, 2026 11:45
@tnkuehne tnkuehne changed the title Point calling apps to connect() in the connector templates' connection docs Put the calling app's link in connector templates' connectUrl Nov 29, 2026
@tnkuehne
tnkuehne force-pushed the app-connect-return-templates branch from 3edf6a7 to e716694 Compare November 29, 2026 12:15
@tnkuehne tnkuehne changed the title Put the calling app's link in connector templates' connectUrl Return connector template sign-ins to the calling page with a reason Nov 29, 2026
@tnkuehne
tnkuehne force-pushed the app-connect-return-templates branch from e716694 to d7f482f Compare November 29, 2026 12:29
@tnkuehne tnkuehne changed the title Return connector template sign-ins to the calling page with a reason Let connector templates decide what a person opening a connect link sees Nov 29, 2026
@tnkuehne
tnkuehne force-pushed the app-connect-return-templates branch from d7f482f to 2b6dff7 Compare November 29, 2026 12:34
@tnkuehne
tnkuehne force-pushed the app-connect-return-templates branch from 2b6dff7 to 349b5f9 Compare November 29, 2026 12:42
A connect link no longer fails when the connector is not set up: the
template shows its own page, which tells an administrator what to set. A
failed sign-in returns connectionError=failed, the value the runtime uses,
instead of connectionError=1. The expired-link pages and Garmin's success
page no longer point only to Widefleet, since the person may have come from
an app. Garmin's key page offers a way back without a key.
@tnkuehne
tnkuehne merged commit c873095 into main Nov 29, 2026
16 checks passed
@tnkuehne
tnkuehne deleted the app-connect-return-templates branch November 29, 2026 13:00
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.

1 participant