mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 09:54:14 +00:00
revert(assistant): drop the ChatGPT relay, open-source apps keep the loopback sign-in
OpenAI offers a fixed web redirect for Sign in with ChatGPT only to selected commercial partners; open-source apps sign in through the 127.0.0.1 loopback callback. The relay could never be switched on, so it goes again.
This commit is contained in:
@@ -71,28 +71,6 @@ export function rememberOpenrouterFlow(flowId: string): void {
|
||||
}
|
||||
}
|
||||
|
||||
const CHATGPT_FLOW_KEY = 'trek.ai.chatgptFlow';
|
||||
|
||||
/** Keeps the ChatGPT sign-in that left for OpenAI and comes back by itself, for the page it returns to. */
|
||||
export function rememberChatgptFlow(flowId: string): void {
|
||||
try {
|
||||
sessionStorage.setItem(CHATGPT_FLOW_KEY, flowId);
|
||||
} catch {
|
||||
// Storage refused (private mode): the return then reads as an expired sign-in.
|
||||
}
|
||||
}
|
||||
|
||||
/** The ChatGPT sign-in this tab started, read once. */
|
||||
export function takeChatgptFlow(): string | null {
|
||||
try {
|
||||
const flowId = sessionStorage.getItem(CHATGPT_FLOW_KEY);
|
||||
sessionStorage.removeItem(CHATGPT_FLOW_KEY);
|
||||
return flowId;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** The flow the OpenRouter sign-in started, read once. */
|
||||
export function takeOpenrouterFlow(): string | null {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user