Skip to content

Commit 57c6a00

Browse files
committed
stripped legacy login and oidc from onboarding
1 parent 3cf44ae commit 57c6a00

File tree

3 files changed

+27
-33
lines changed

3 files changed

+27
-33
lines changed

src/Pages/Login/Components/ConnectionContainer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ import HintBubble from "../../../Components/General/HintBubble";
99
interface IProp {
1010
setInstanceSettings: Function;
1111
setNickname: Function;
12-
setLegacyLogin: Function;
1312
}
1413

15-
export const ConnectionContainer = ({ setInstanceSettings, setNickname, setLegacyLogin }: IProp) => {
14+
export const ConnectionContainer = ({ setInstanceSettings, setNickname }: IProp) => {
1615
const isOverlay: Boolean = window.location.href.includes("/overlay");
1716
const [quickSwapModules, setQuickSwapModules] = useState<QuickSwapType[]>([]);
1817
const [quickSwapSelected, setQuickSwapSelected] = useState<QuickSwapType | null>(null);

src/Pages/Login/Components/ModuleOnboarding.tsx

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { QuickSwapType } from "../../../Types/General/QuickSwapType";
99
import { useNavigate } from "react-router-dom";
1010

1111
interface IProps {
12-
legacyLogin: boolean;
1312
connectionConfig: ConnectionConfigType;
1413
spacetime: any;
1514
}
@@ -22,7 +21,7 @@ const steps = [
2221
{ label: "Finish", description: "" },
2322
];
2423

25-
export const ModuleOnboarding = ({ legacyLogin, connectionConfig, spacetime }: IProps) => {
24+
export const ModuleOnboarding = ({ connectionConfig, spacetime }: IProps) => {
2625
const debug: boolean = false;
2726

2827
const navigate = useNavigate();
@@ -45,6 +44,7 @@ export const ModuleOnboarding = ({ legacyLogin, connectionConfig, spacetime }: I
4544

4645
const [backupFile, setBackupFile] = useState<any>(null);
4746
const [fileError, setFileError] = useState<boolean>(false);
47+
const [copyAuthButtonText, setCopyAuthButtonText] = useState<string>("Copy Owner Token");
4848
const [backupRowCount, setBackupRowCount] = useState<any>(null);
4949
const [showUploadingText, setShowUploadingText] = useState<boolean>(false);
5050

@@ -406,34 +406,31 @@ export const ModuleOnboarding = ({ legacyLogin, connectionConfig, spacetime }: I
406406
configuration from the settings.
407407
</p>
408408

409-
{/* NEED TO FIGURE OUT HOW TO HANDLE LEGACY/ANONYMOUS SPACETIMEAUTH LOGINS */}
410-
{/* {legacyLogin && (
411-
<div className="mt-8">
412-
<p>
413-
Since you're using legacy login, it is <b>your responsibility</b> to keep your authentication token
414-
safe. Use this button to copy your token to clipboard and save it somewhere on your computer!
415-
</p>
416-
<StyledButton
417-
onClick={() => {
418-
navigator.clipboard.writeText(localStorage.getItem("stdbToken")!);
419-
420-
setAuthButtonText("Copied!");
421-
422-
setTimeout(() => {
423-
setAuthButtonText("Copy Auth Token");
424-
}, 1000);
425-
}}
426-
className="ml-0! mt-2"
427-
>
428-
{copyAuthButtonText}
429-
</StyledButton>
430-
</div>
431-
)} */}
409+
<div className="mt-8">
410+
<p>
411+
It is <b><u>your responsibility</u></b> to keep your owner authentication token
412+
safe. Copy your backup token by clicking the button below and save it somewhere safe!
413+
</p>
414+
<StyledButton
415+
onClick={() => {
416+
navigator.clipboard.writeText(localStorage.getItem("stdbToken")!);
417+
418+
setCopyAuthButtonText("Copied!");
419+
420+
setTimeout(() => {
421+
setCopyAuthButtonText("Copy Owner Token");
422+
}, 1000);
423+
}}
424+
className="ml-0! mt-2"
425+
>
426+
{copyAuthButtonText}
427+
</StyledButton>
428+
</div>
432429

433430
<div className="mt-8">
434431
<p>
435432
To start using Pogly on your stream, you need to create a new browser source in your OBS/StreamLabs
436-
and paste the Pogly overlay URL into it{" "}
433+
and paste the Pogly overlay URL into it.
437434
<a
438435
href="https://github.com/PoglyApp/pogly-documentation/blob/main/use/firstTimeSetup.md#obs--streamlabs-browser-source"
439436
target="_blank"
@@ -460,7 +457,7 @@ export const ModuleOnboarding = ({ legacyLogin, connectionConfig, spacetime }: I
460457
</StyledButton>
461458
</div>
462459

463-
<div className="grid mt-6">
460+
{/* <div className="grid mt-6">
464461
<h3 className="flex text-xl font-semibold mb-2 text-[#e9eeff]">Load backup</h3>
465462
<span>
466463
If you have a backup file, you can select it here. It will then be loaded once you finish onboarding.
@@ -477,7 +474,7 @@ export const ModuleOnboarding = ({ legacyLogin, connectionConfig, spacetime }: I
477474
{fileError && <X color="red" className="grid self-center" />}
478475
{!fileError && backupFile && <Check color="green" className="grid self-center" />}
479476
</div>
480-
</div>
477+
</div> */}
481478
</div>
482479

483480
<div className="absolute bottom-0 w-full flex justify-between">

src/Pages/Login/Login.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export const Login = () => {
3131
const stdbAuthenticatedRef = useRef<boolean>(false);
3232
const [instanceConfigured, setInstanceConfigured] = useState<boolean>(false);
3333
const [nickname, setNickname] = useState<string>(localStorage.getItem("nickname") || "");
34-
const [legacyLogin, setLegacyLogin] = useState<boolean>(false);
3534

3635
const spacetime = useStDB(connectionConfig, setStdbConnected, setInstanceConfigured, setStdbAuthenticated);
3736

@@ -124,7 +123,6 @@ export const Login = () => {
124123
<ConnectionContainer
125124
setInstanceSettings={setConnectionConfig}
126125
setNickname={setNickname}
127-
setLegacyLogin={setLegacyLogin}
128126
/>
129127
);
130128
}
@@ -294,7 +292,7 @@ export const Login = () => {
294292
// Step 8) Has the Pogly Instance been configured?
295293
if (!instanceConfigured) {
296294
DebugLogger("Pogly Instance is not configured");
297-
return <ModuleOnboarding legacyLogin={legacyLogin} connectionConfig={connectionConfig} spacetime={spacetime} />;
295+
return <ModuleOnboarding connectionConfig={connectionConfig} spacetime={spacetime} />;
298296
}
299297

300298
navigate("/canvas", { replace: true });

0 commit comments

Comments
 (0)