GitPlus
-
+
diff --git a/server/accountsSession.ts b/server/accountsSession.ts
index e95445b..4545445 100644
--- a/server/accountsSession.ts
+++ b/server/accountsSession.ts
@@ -2,7 +2,7 @@ import { BRAND } from '../shared/brand';
import { firstPartyOrigin, publicIdentity, record, validSelector, type AccountSession } from '../shared/accounts';
export interface SessionEnv { GITPLUS_ORIGIN?: string; ACCOUNTS_API_ORIGIN?: string }
-const COOKIE_NAME = /^gothwad_(?:at|rt|sid|active|accounts|sess_[a-f])$/;
+const COOKIE_NAME = /^bansify_(?:at|rt|sid|active|accounts|sess_[a-f])$/;
export function accountCookies(header: string): string {
return header.split(';').map((pair) => pair.trim()).filter((pair) => COOKIE_NAME.test(pair.split('=')[0])).join('; ');
@@ -39,15 +39,15 @@ export async function handleSession(request: Request, env: SessionEnv, fetcher:
const url = new URL(request.url);
const origin = firstPartyOrigin(env.GITPLUS_ORIGIN || BRAND.productionOrigin);
const apiOrigin = firstPartyOrigin(env.ACCOUNTS_API_ORIGIN || BRAND.accountsApiOrigin);
- if (!origin || !apiOrigin || apiOrigin === origin) return unavailable('invalid_configuration', 'Configure distinct HTTPS GitPlus and Accounts API origins under gothwadtech.com.');
+ if (!origin || !apiOrigin || apiOrigin === origin) return unavailable('invalid_configuration', 'Configure distinct HTTPS GitPlus and Accounts API origins under bansify.com.');
if (request.headers.get('Sec-Fetch-Site') === 'cross-site' || (request.headers.has('Origin') && request.headers.get('Origin') !== url.origin)) {
return sessionJson({ error: 'origin_not_allowed' }, 403);
}
- if (url.origin !== origin) return sessionJson({ status: 'unsupported', code: 'first_party_domain_required', message: 'Automatic Gothwad Accounts sign-in requires the configured Gothwad Tech custom domain. Shared cookies are not available on pages.dev, localhost or Arena previews.', productionOrigin: origin });
+ if (url.origin !== origin) return sessionJson({ status: 'unsupported', code: 'first_party_domain_required', message: 'Automatic Bansify Accounts sign-in requires the configured Bansify custom domain. Shared cookies are not available on pages.dev, localhost or Arena previews.', productionOrigin: origin });
const selector = url.searchParams.get('authuser');
if (selector !== null && !validSelector(selector)) return sessionJson({ error: 'invalid_authuser' }, 400);
const cookie = accountCookies(request.headers.get('Cookie') || '');
- if (!cookie) return sessionJson({ status: 'anonymous', code: 'signed_out', message: 'Sign in with Gothwad Accounts to continue to GitPlus.' }, 401);
+ if (!cookie) return sessionJson({ status: 'anonymous', code: 'signed_out', message: 'Sign in with Bansify Accounts to continue to GitPlus.' }, 401);
const headers = new Headers({ Accept: 'application/json', Cookie: cookie });
if (selector !== null) headers.set('X-Gothwad-Authuser', selector);
// No incoming Authorization header, arbitrary URL, password, or GitHub token is forwarded.
@@ -60,7 +60,7 @@ export async function handleSession(request: Request, env: SessionEnv, fetcher:
if (response.status === 401 || response.status === 403) {
// Accounts currently clears every slot on a failed /me. Do not propagate global sign-out
// from a read-only GitPlus probe (especially when a selected slot disappears).
- return sessionJson({ status: 'anonymous', code: 'signed_out', message: 'The selected Gothwad session has expired. Sign in again.' }, 401);
+ return sessionJson({ status: 'anonymous', code: 'signed_out', message: 'The selected Bansify session has expired. Sign in again.' }, 401);
}
if (response.status === 429) {
const reply = unavailable('accounts_rate_limited', 'Accounts is rate-limited. Wait before retrying.', 429);
@@ -68,21 +68,21 @@ export async function handleSession(request: Request, env: SessionEnv, fetcher:
if (retry && /^\d{1,5}$/.test(retry)) reply.headers.set('Retry-After', retry);
return reply;
}
- if (!response.ok) return unavailable('accounts_unavailable', 'Gothwad Accounts is temporarily unavailable. Retry without signing out.');
+ if (!response.ok) return unavailable('accounts_unavailable', 'Bansify Accounts is temporarily unavailable. Retry without signing out.');
if (!response.headers.get('Content-Type')?.toLowerCase().includes('application/json')) return unavailable('accounts_not_json', 'Accounts returned a non-JSON page. Verify the API Worker route.');
const raw: unknown = await response.json();
// Only secure allowlisted cookies from the fixed Accounts endpoint can reach the browser.
cookies = rotationCookies(response.headers);
- if (record(raw)?.authenticated === false) return sessionJson({ status: 'anonymous', code: 'signed_out', message: 'Sign in with Gothwad Accounts to continue.' }, 401);
+ if (record(raw)?.authenticated === false) return sessionJson({ status: 'anonymous', code: 'signed_out', message: 'Sign in with Bansify Accounts to continue.' }, 401);
const identity = publicIdentity(raw);
- if (!identity) return unavailable('accounts_invalid_identity', 'Accounts returned an incomplete identity. Retry or contact Gothwad Tech support.', 503, cookies);
+ if (!identity) return unavailable('accounts_invalid_identity', 'Accounts returned an incomplete identity. Retry or contact Bansify support.', 503, cookies);
// Accounts currently falls back to slots[0] for a missing explicit selector. Reject that
// fallback rather than silently attaching another person's GitHub credentials.
if (selector !== null && (/^[a-f]$/.test(selector) ? identity.activeSlot !== selector : identity.authuser !== Number(selector))) {
- return sessionJson({ status: 'anonymous', code: 'account_selection_changed', message: 'The selected account is no longer available. Choose a Gothwad account again.' }, 409, cookies);
+ return sessionJson({ status: 'anonymous', code: 'account_selection_changed', message: 'The selected account is no longer available. Choose a Bansify account again.' }, 409, cookies);
}
return sessionJson(identity, 200, cookies);
} catch {
- return unavailable('accounts_network_error', 'Could not verify Gothwad Accounts within the time limit. Check the connection and retry.', 503, cookies);
+ return unavailable('accounts_network_error', 'Could not verify Bansify Accounts within the time limit. Check the connection and retry.', 503, cookies);
} finally { clearTimeout(timer); }
}
diff --git a/server/githubOAuth.ts b/server/githubOAuth.ts
index ef70f4d..60efef3 100644
--- a/server/githubOAuth.ts
+++ b/server/githubOAuth.ts
@@ -109,7 +109,7 @@ async function oauthRequest(request: Request, env: GitHubOAuthEnv, fetcher: type
const account = await verifiedAccount(request, env, txn.selector, fetcher);
if (!account.ok) { account.response.headers.append('Set-Cookie', clearOAuthCookie()); return account.response; }
const cookies = [...account.cookies, ...cleared];
- if (account.session.user.id !== txn.owner) return jsonResponse({ error: 'account_changed', message: 'Your Gothwad account changed. Start the GitHub connection again.' }, 409, cookies);
+ if (account.session.user.id !== txn.owner) return jsonResponse({ error: 'account_changed', message: 'Your Bansify account changed. Start the GitHub connection again.' }, 409, cookies);
const controller = new AbortController();
const timer = setTimeout(() => controller.abort(), 10_000);
try {
diff --git a/shared/accounts.ts b/shared/accounts.ts
index 5ba71d7..152429d 100644
--- a/shared/accounts.ts
+++ b/shared/accounts.ts
@@ -1,6 +1,6 @@
import { BRAND } from './brand';
-export interface GothwadUser {
+export interface BansifyUser {
id: string;
username: string;
name: string;
@@ -14,7 +14,7 @@ export interface GothwadAccount {
}
export interface AuthenticatedSession {
status: 'authenticated';
- user: GothwadUser;
+ user: BansifyUser;
activeSlot: string | null;
authuser: number;
accounts: GothwadAccount[];
@@ -79,7 +79,7 @@ export function firstPartyOrigin(value: string): string | null {
}
export function signInUrl(origin: string, selector: string | null = null, choose = false): string {
const safeOrigin = firstPartyOrigin(origin);
- if (!safeOrigin) throw new Error('Gothwad SSO requires a configured Gothwad Tech HTTPS domain.');
+ if (!safeOrigin) throw new Error('Bansify SSO requires a configured Bansify HTTPS domain.');
const next = new URL('/', safeOrigin);
next.searchParams.set(RETURN_MARKER, '1');
if (selector && validSelector(selector)) next.searchParams.set('authuser', selector);
diff --git a/shared/brand.ts b/shared/brand.ts
index 182990b..8279883 100644
--- a/shared/brand.ts
+++ b/shared/brand.ts
@@ -1,10 +1,10 @@
-/** GitPlus is a Gothwad Tech product. Keep public product identity consistent. */
+/** GitPlus is a Bansify product. Keep public product identity consistent. */
export const BRAND = {
name: 'GitPlus',
- company: 'Gothwad Tech',
+ company: 'Bansify',
version: '0.2.0',
- domain: 'gothwadtech.com',
- accountsWebOrigin: 'https://accounts.gothwadtech.com',
- accountsApiOrigin: 'https://api.gothwadtech.com',
- productionOrigin: 'https://gitplus.gothwadtech.com',
+ domain: 'bansify.com',
+ accountsWebOrigin: 'https://accounts.bansify.com',
+ accountsApiOrigin: 'https://api.bansify.com',
+ productionOrigin: 'https://gitplus.bansify.com',
} as const;
diff --git a/shared/githubOAuthErrors.ts b/shared/githubOAuthErrors.ts
index 65469aa..5127a20 100644
--- a/shared/githubOAuthErrors.ts
+++ b/shared/githubOAuthErrors.ts
@@ -6,7 +6,7 @@ export const OAUTH_ERRORS = {
github_exchange_failed: 'An older GitPlus backend reported a GitHub token-exchange failure without a specific reason. Check that the custom domain is serving the latest Pages Functions deployment; do not assume the secret is wrong.',
oauth_response_unrecognized: 'The OAuth endpoint returned JSON that does not match the expected GitPlus error contract. Check the API deployment and any proxy/Worker route on this domain. This response does not establish that the OAuth credentials are wrong.',
oauth_not_configured: 'The deployed Pages Function is missing OAuth configuration. Set the two credentials in Pages Settings → Variables and secrets, then redeploy.',
- first_party_domain_required: 'Open GitPlus on its configured Gothwad Tech custom domain before connecting GitHub.',
+ first_party_domain_required: 'Open GitPlus on its configured Bansify custom domain before connecting GitHub.',
origin_not_allowed: 'GitPlus rejected the request origin. Open the custom domain directly in the same browser tab and start again.',
method_not_allowed: 'The OAuth request reached an endpoint with an unsupported method. Check the deployed Functions routing.',
json_required: 'The OAuth endpoint did not receive the expected JSON request.',
@@ -15,8 +15,8 @@ export const OAUTH_ERRORS = {
invalid_state: 'The GitHub callback cookie/state could not be validated. The attempt may have expired or been replaced. Start again in the same browser tab.',
invalid_callback: 'GitHub returned without a usable authorization code. Start a new connection attempt.',
denied: 'GitHub authorization was cancelled. Try again or connect with a PAT.',
- account_changed: 'Your Gothwad account changed during GitHub authorization. Start again.',
- account_unavailable: 'Your Gothwad session could not be verified during authorization. Retry your connection.',
+ account_changed: 'Your Bansify account changed during GitHub authorization. Start again.',
+ account_unavailable: 'Your Bansify session could not be verified during authorization. Retry your connection.',
github_client_credentials: 'GitHub rejected the OAuth App Client ID / Client Secret pair. Check that the deployed Pages secrets belong to the same OAuth App, then redeploy.',
github_redirect_mismatch: 'GitHub rejected the callback URL. The OAuth App callback must exactly match the GitPlus custom-domain /api/github/callback URL.',
github_bad_code: 'GitHub rejected an expired, already-used or invalid authorization code. Start a fresh connection; do not reload the callback.',
diff --git a/src/components/AuthScreen.tsx b/src/components/AuthScreen.tsx
index b3f8ffa..47bd7d9 100644
--- a/src/components/AuthScreen.tsx
+++ b/src/components/AuthScreen.tsx
@@ -160,7 +160,7 @@ export const AuthScreen: React.FC = ({ onSuccess, initialError
GitPlus
- A Gothwad Tech product · Connect GitHub to browse repositories, edit code and sync ZIP files.
+ A Bansify product · Connect GitHub to browse repositories, edit code and sync ZIP files.
- You are signed in with Gothwad Accounts. GitHub access is a separate connection; your Gothwad password is never requested here.
+ You are signed in with Bansify Accounts. GitHub access is a separate connection; your Bansify password is never requested here.
{oauthEnabled === null ? 'Checking OAuth availability…' : 'OAuth is unavailable or not configured. The administrator must configure the GitHub OAuth App runtime credentials. You can still use a PAT below.'}
}
-
Saved only in this tab session, bound to your Gothwad account. No D1 storage or cross-device sync. Unchecking deletion does not revoke an earlier GitHub grant; revoke it in GitHub settings.
+
Saved only in this tab session, bound to your Bansify account. No D1 storage or cross-device sync. Unchecking deletion does not revoke an earlier GitHub grant; revoke it in GitHub settings.
- GitHub connection is scoped to this Gothwad account and tab.
+ GitHub connection is scoped to this Bansify account and tab.
) : (
- by Gothwad Tech
+ by Bansify
)}
diff --git a/src/components/accounts/AccountsBar.tsx b/src/components/accounts/AccountsBar.tsx
index c29f08e..a2ee2df 100644
--- a/src/components/accounts/AccountsBar.tsx
+++ b/src/components/accounts/AccountsBar.tsx
@@ -26,8 +26,8 @@ export function AccountsBar() {
const manageHref = `${BRAND.accountsWebOrigin}/u/${session?.authuser ?? 0}/me`;
const mutate = async (slot?: string) => {
if (!session) return;
- const label = slot ? 'this Gothwad account' : 'all Gothwad accounts in this browser';
- if (!confirm(`Sign out of ${label} across Gothwad products? Unsaved work may be lost.`)) return;
+ const label = slot ? 'this Bansify account' : 'all Bansify accounts in this browser';
+ if (!confirm(`Sign out of ${label} across Bansify products? Unsaved work may be lost.`)) return;
try {
const response = await fetch(slot ? '/api/accounts/signout' : '/api/accounts/signout-all', {
method: 'POST', credentials: 'same-origin', cache: 'no-store', redirect: 'error', signal: AbortSignal.timeout(15_000),
@@ -45,16 +45,16 @@ export function AccountsBar() {
const options: MenuOptions = {
appDomain: BRAND.domain, accountsWebOrigin: BRAND.accountsWebOrigin,
// All widget mutations are overridden below. A future default action cannot call raw /auth/me.
- accountsApiOrigin: `${window.location.origin}/api/accounts`, ecosystemName: 'Gothwad',
+ accountsApiOrigin: `${window.location.origin}/api/accounts`, ecosystemName: 'Bansify',
theme: isDark ? 'dark' : 'light', anchorEl: anchor.current,
nextUrl: new URL(signInUrl(window.location.origin, null, true)).searchParams.get('next')!,
manageAccountHref: manageHref,
accountHref: (account) => `/?authuser=${encodeURIComponent(account.id)}`,
- onSwitchAccount: (account) => { if (confirm('Switch Gothwad account? GitPlus will disconnect GitHub and discard unsaved work in this tab.')) switchAccount(account.id); },
+ onSwitchAccount: (account) => { if (confirm('Switch Bansify account? GitPlus will disconnect GitHub and discard unsaved work in this tab.')) switchAccount(account.id); },
onSignOutAccount: (slot) => mutate(slot), onSignOutAll: () => mutate(),
onManageAccount: () => { window.location.assign(manageHref); },
onClose: () => anchor.current?.focus(), onError: (message) => setNotice(message),
- extraActions: [{ label: 'Sign out of GitPlus (this tab)', onClick: () => { if (confirm('Sign out of GitPlus in this tab? Other Gothwad products will stay signed in.')) signOut(); } }],
+ extraActions: [{ label: 'Sign out of GitPlus (this tab)', onClick: () => { if (confirm('Sign out of GitPlus in this tab? Other Bansify products will stay signed in.')) signOut(); } }],
};
// Keep the same shared sheet in sync with theme/account changes, without using auto-sso.
useEffect(() => {
@@ -66,13 +66,13 @@ export function AccountsBar() {
const widget = await accountWidget.load();
if (!alive.current || latestOwner.current !== session.user.id) return;
setLoading(false);
- if (!widget) { setNotice('The universal Accounts menu could not load. Retry, or manage your account on Gothwad Accounts.'); return; }
+ if (!widget) { setNotice('The universal Accounts menu could not load. Retry, or manage your account on Bansify Accounts.'); return; }
try { widget.open(widgetState(session), { ...options, anchorEl: anchor.current }); }
catch { setNotice('The Accounts menu is temporarily unavailable. Use the account management link.'); }
};
- return
;
}
diff --git a/src/components/accounts/AccountsGate.tsx b/src/components/accounts/AccountsGate.tsx
index fd6c54d..21c496e 100644
--- a/src/components/accounts/AccountsGate.tsx
+++ b/src/components/accounts/AccountsGate.tsx
@@ -11,7 +11,7 @@ export function AccountsGate({ children }: React.PropsWithChildren) {
const loading = state.status === 'loading';
const paused = state.status === 'paused';
const anonymous = state.status === 'anonymous';
- const title = loading ? 'Checking your Gothwad Account' : paused ? 'Signed out of GitPlus' : anonymous ? 'Your account. Your workspace.' : state.status === 'unsupported' ? 'Use your GitPlus custom domain' : 'Account verification unavailable';
+ const title = loading ? 'Checking your Bansify Account' : paused ? 'Signed out of GitPlus' : anonymous ? 'Your account. Your workspace.' : state.status === 'unsupported' ? 'Use your GitPlus custom domain' : 'Account verification unavailable';
return (
@@ -23,17 +23,17 @@ export function AccountsGate({ children }: React.PropsWithChildren) {
{loading ? : }
{title}
- {loading ? 'Already signed in to Gothwad Accounts? GitPlus will securely recognize your existing session.'
- : paused ? 'Your GitHub connection has been cleared from this tab. Other Gothwad products remain signed in. Continue to verify your account again.'
+ {loading ? 'Already signed in to Bansify Accounts? GitPlus will securely recognize your existing session.'
+ : paused ? 'Your GitHub connection has been cleared from this tab. Other Bansify products remain signed in. Continue to verify your account again.'
: 'message' in state ? state.message : ''}
{anonymous && returned &&
Accounts returned without a usable session. Check shared cookies and the custom domain, then retry. GitPlus will not redirect you in a loop.
Sign in with Gothwad Accounts first, then connect GitHub separately. GitPlus never asks for your Gothwad password or copies your Accounts tokens into browser storage.
+
Sign in with Bansify Accounts first, then connect GitHub separately. GitPlus never asks for your Bansify password or copies your Accounts tokens into browser storage.
- GitPlus is a Gothwad Tech product: a GitHub mobile and web workspace. Provides instantaneous atomic ZIP code synchronization, commit time-travel diffing, Actions CI/CD workflows, releases publisher, issues manager, and gists engine.
+ GitPlus is a Bansify product: a GitHub mobile and web workspace. Provides instantaneous atomic ZIP code synchronization, commit time-travel diffing, Actions CI/CD workflows, releases publisher, issues manager, and gists engine.