Jobber/orchestrator/src/client/pages/GmailOauthCallbackPage.tsx
Shaheer Sarfaraz 687fd5e91f
feat(post-application): automatically pull from email (#145)
* feat(post-application): add schema and shared types for provider ingestion (#136)

* test(orchestrator): ensure full localStorage shape in vitest setup

* feat(post-application): add provider registry and dispatcher framework (#137) (#146)

* Implement Gmail provider credential persistence (#147)

* Add unified post-application provider action API (#148)

* Implement Gmail ingestion sync with 95/60 relevance policy

* Implement Gmail ingestion sync with 95/60 relevance policy (#149)

* feat(post-application): add job mapping engine with llm rerank fallback

* feat(post-application): add inbox review APIs with transactional approve/deny (#151)

* feat(post-application): add tracking inbox UI with provider controls (#152)

* oauth implementation

* UI changes

* see past runs in more detail

* occurred at comes from email

* state mismatch

* better UI representation

* comments

* comments

* comments

* comments

* documentation

* explainer

* set things manually

* scrolling

* any found email can be pending

* searchable download

* Email-to-Job Matching Decision Tree

* email viewer list improvement

* simplification initial commit

* exclude discovered jobs

* show only resady

* dropdown

* mermaid

* syntax

* targets is the same as logging that is done manually

* event label

* duplicate avoidance

* clean up html

* token saving

* print

* send idx not uuid

* remove logging

* formatting

* better documentation

* documentation

* comments

* process all

* comments
2026-02-12 19:48:25 +00:00

39 lines
1.0 KiB
TypeScript

import type React from "react";
import { useEffect } from "react";
import { useSearchParams } from "react-router-dom";
export const GmailOauthCallbackPage: React.FC = () => {
const [searchParams] = useSearchParams();
useEffect(() => {
const code = searchParams.get("code");
const state = searchParams.get("state");
const error = searchParams.get("error");
if (window.opener && !window.opener.closed) {
window.opener.postMessage(
{
type: "gmail-oauth-result",
code,
state,
error,
},
window.location.origin,
);
}
window.close();
}, [searchParams]);
return (
<main className="flex min-h-screen items-center justify-center px-4">
<div className="text-center">
<h1 className="text-lg font-semibold">Completing Gmail connection</h1>
<p className="mt-2 text-sm text-muted-foreground">
You can close this window if it does not close automatically.
</p>
</div>
</main>
);
};