Skip to content

fix(signup): make the captcha webview and handle domains follow the selected community - #175

Open
rishibalakrishnan wants to merge 3 commits into
mainfrom
fix/captcha-webview-tenant-pds-host
Open

fix(signup): make the captcha webview and handle domains follow the selected community#175
rishibalakrishnan wants to merge 3 commits into
mainfrom
fix/captcha-webview-tenant-pds-host

Conversation

@rishibalakrishnan

@rishibalakrishnan rishibalakrishnan commented Aug 19, 2026

Copy link
Copy Markdown

Two native signup bugs that both come from reading community-specific values
from the wrong place. Bundled together so one OTA bundle can verify both.

1. Captcha webview blocks the community PDS

The webview gates navigation on a static host allowlist covering only Blacksky
hosts. Once the community picker let signup target another community's PDS, the
captcha page hosted there was blocked before any request was made — blank step
on iOS, and the form post is affected on Android.

Fixed by deriving the allowed host from the same serviceUrl the captcha URL
is built from, so any current or future community PDS is covered without
editing a list. Unset or malformed serviceUrl adds nothing.

2. Handle step ignores the community's handle domains

Signup filtered handle domains using the ambient brand, which is pinned to the
bundled Blacksky config while logged out. Picking a community changed the PDS
but never its handle domains, so the handle step offered everything the PDS
advertises and defaulted to the first entry — e.g. picking Latinsky produced a
.myatproto.social suffix.

Fixed by fetching the selected community's published config and filtering with
that. Blacksky is fetched too, since the bundled copy can be stale.

A failed or pending fetch leaves every advertised domain selectable rather than
blocking the step: an extra domain on offer is cheaper to correct than a signup
the user has to restart.

Testing

  • 12 new unit tests (buildAllowedHosts, filterUserDomains), covering both
    fallback paths in each
  • Full signup + community suites pass: 765 tests, 41 suites
  • eslint + prettier clean on touched files; no new type errors

Not device-verified. The tests cover the host and filter logic, not the
rendered steps — this needs a manual signup pass on iOS and Android: pick
Latinsky and confirm the suffix, pick Medsky and confirm the captcha renders.

Follow-up (not in this PR)

redirectHost in CaptchaWebView is still hardcoded and should be derived
from the community config too.

The native captcha webview gated navigation on a static host allowlist that
only covered Blacksky hosts. Once the community picker let signup target a
third-party PDS, the gate page on that PDS was blocked: on iOS the initial
load never rendered, and the captcha form post was blocked on both platforms.

Derive the allowed host from the same serviceUrl the captcha URL is built
from, so any current or future community PDS is covered. An unset or
malformed serviceUrl adds nothing and leaves the static list unchanged.
@rishibalakrishnan

Copy link
Copy Markdown
Author

@github-actions ota

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Your requested OTA deployment was published to channel pull-request-175.

Note

On-device apply works on TestFlight and development builds only. Production builds keep the anti-bricking safety net (disableAntiBrickingMeasures is off), so the deep link below is a no-op there.

blacksky://intent/apply-ota?channel=pull-request-175

Generated by PR labeler 🤖

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Old size New size Diff
9.11 MB 9.12 MB 457 B (0.00%)

Native signup filtered handle domains using the ambient brand, which is pinned
to the bundled Blacksky config while logged out. Picking a community changed
the PDS but never its handle domains, so the handle step offered every domain
the PDS advertises and defaulted to the first one.

Fetch the selected community's published config and filter with that. Blacksky
is fetched too, since the bundled copy can be stale.

A failed or pending fetch leaves every advertised domain selectable rather than
blocking the step — an extra domain on offer is cheaper to correct than a
signup the user has to restart.
@rishibalakrishnan rishibalakrishnan changed the title fix(signup): allow the selected community PDS in the captcha webview fix(signup): make the captcha webview and handle domains follow the selected community Aug 19, 2026
@rishibalakrishnan

Copy link
Copy Markdown
Author

@github-actions ota

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Your requested OTA deployment was published to channel pull-request-175.

Note

On-device apply works on TestFlight and development builds only. Production builds keep the anti-bricking safety net (disableAntiBrickingMeasures is off), so the deep link below is a no-op there.

blacksky://intent/apply-ota?channel=pull-request-175

Generated by PR labeler 🤖

…does not intersect

Switching the hosting provider after picking a community updates serviceUrl but
leaves selectedBrandSlug set, so the handle domains can be filtered against a
PDS from a different community. That produced an empty list, no selectable
suffix, and a handle the user could not make valid.

Treat an empty intersection the same as a missing config: the PDS is the
authority on what it accepts.
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