Skip to content

feat(verify): handle direct visits to /verify with no state context #591

Description

@0xdevcollins

Context

PR #590 added /verify as the post-KYC result page. It's designed to be hit via the backend redirect (/verify?state=in_review&session_id=...).

A user who lands there directly — old email link, bookmark, manual URL paste — sees the not_started card with a "Verify identity" button. That's accurate but slightly off-key: this page is a result page, not a launchpad.

Suggested fix

Detect direct visits (no ?state= query AND no ?session_id=) and redirect to /me/settings?tab=identity. The Settings tab has the verification section that's purpose-built for starting from cold.

Pseudo:

useEffect(() => {
  const hasState = searchParams.get('state');
  const hasSession = searchParams.get('session_id');
  if (!hasState && !hasSession) {
    router.replace('/me/settings?tab=identity');
  }
}, [...]);

Keep the existing fallback (router.replace('/')) for the error-with-no-state case.

Where

app/verify/page.tsxVerifyResult (top-level effect).

Severity / effort

P3 / polish. ~15 min.

Linked

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions