Remove data transfer code
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
import { Button, Container, Heading, Text } from "@chakra-ui/react";
|
||||
|
||||
export default function () {
|
||||
return (
|
||||
<Container maxW="container.md">
|
||||
<Heading size="lg">Transfer your Save Data</Heading>
|
||||
<br />
|
||||
<br />
|
||||
<Text>Lost your account? Want to shake off a stalker?</Text>
|
||||
<br />
|
||||
<br />
|
||||
<Text size="lg">We can help!</Text>
|
||||
<br />
|
||||
<br />
|
||||
<Text>Some information you should know:</Text>
|
||||
<br />
|
||||
<Text>
|
||||
We might require your .ROBLOSECURITY cookie, depending on your
|
||||
circumstances. This is because Roblox does not allow terminated accounts
|
||||
to utilize OAuth. Normally this would be a very bad idea, and we don't
|
||||
like doing this either, but it may be the only option. Security is also
|
||||
less of a concern for terminated accounts as they are blocked from
|
||||
accessing almost all Roblox API endpoints (the exceptions being login,
|
||||
logout, and creating support tickets - and only the logout endpoint
|
||||
doesn't require completing a captcha). If you are concerned about your
|
||||
account's security, we suggest logging in to your terminated account in
|
||||
a private/incognito window, copying the .ROBLOSECURITY cookie from
|
||||
there, and logging out once we have verified your old account (which
|
||||
normally only takes a few seconds). The ultra paranoid may also consider
|
||||
resetting their password. If you are not convinced or still have
|
||||
questions, join our Discord server (link is on the about page) and open
|
||||
a ticket with ModMail for us to verify you manually (no cookie
|
||||
required).
|
||||
</Text>
|
||||
<br />
|
||||
<br />
|
||||
<Button as="a" href="/data-transfer/start" colorScheme="blue">
|
||||
Start my Transfer
|
||||
</Button>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import Success from "../../components/Success.js";
|
||||
|
||||
export default function () {
|
||||
return (
|
||||
<Success
|
||||
heading="Data Transfer Submitted"
|
||||
message="Your request is now being processed; this normally takes 1-2 weeks."
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
import { Button, Card, Container, Heading, VStack } from "@chakra-ui/react";
|
||||
import { useLoaderData } from "@remix-run/react";
|
||||
|
||||
export async function loader({ context }: { context: RequestContext }) {
|
||||
const { host, protocol } = new URL(context.request.url);
|
||||
|
||||
return { client_id: context.env.ROBLOX_OAUTH_CLIENT_ID, host, protocol };
|
||||
}
|
||||
|
||||
export default function () {
|
||||
const loaderData = useLoaderData<typeof loader>();
|
||||
return (
|
||||
<Container pt="16vh">
|
||||
<Card borderRadius="32px" p="4vh">
|
||||
<VStack alignContent="center" gap="2vh">
|
||||
<Heading>Verify your new Roblox account</Heading>
|
||||
<br />
|
||||
<Button
|
||||
as="a"
|
||||
borderRadius="24px"
|
||||
colorScheme="blue"
|
||||
href={`https://apis.roblox.com/oauth/v1/authorize?client_id=${
|
||||
loaderData.client_id
|
||||
}&redirect_uri=${encodeURIComponent(
|
||||
`${loaderData.protocol}//${loaderData.host}/api/data-transfers/verify`,
|
||||
)}&response_type=code&scope=openid%20profile`}
|
||||
>
|
||||
Verify
|
||||
</Button>
|
||||
</VStack>
|
||||
</Card>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
import {
|
||||
Button,
|
||||
Container,
|
||||
Heading,
|
||||
HStack,
|
||||
Radio,
|
||||
RadioGroup,
|
||||
Text,
|
||||
Textarea,
|
||||
useToast,
|
||||
} from "@chakra-ui/react";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function () {
|
||||
const [showCookieBox, setShowCookieBox] = useState(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
return (
|
||||
<Container maxW="container.md">
|
||||
<Heading pt="36px">Let's get started</Heading>
|
||||
<Text pt="128px">Is your old Roblox account banned?</Text>
|
||||
<RadioGroup onChange={(val) => setShowCookieBox(JSON.parse(val))}>
|
||||
<HStack>
|
||||
<Radio value="false">No</Radio>
|
||||
<Radio value="true">Yes</Radio>
|
||||
</HStack>
|
||||
</RadioGroup>
|
||||
<Textarea
|
||||
id="cookie-box"
|
||||
placeholder="Paste your .ROBLOSECURITY cookie here"
|
||||
mt="16px"
|
||||
style={{ display: showCookieBox ? "initial" : "none" }}
|
||||
/>
|
||||
<Button
|
||||
colorScheme="blue"
|
||||
isLoading={loading}
|
||||
loadingText="Processing..."
|
||||
mt="16px"
|
||||
onClick={async () => {
|
||||
setLoading(true);
|
||||
const createTransferReq = await fetch("/api/data-transfers/create", {
|
||||
body: JSON.stringify({
|
||||
can_access: !showCookieBox,
|
||||
cookie: (
|
||||
document.getElementById("cookie-box") as HTMLInputElement
|
||||
).value,
|
||||
}),
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
},
|
||||
method: "POST",
|
||||
});
|
||||
|
||||
if (!createTransferReq.ok) {
|
||||
setLoading(false);
|
||||
useToast()({
|
||||
description: (
|
||||
(await createTransferReq.json()) as { error: string }
|
||||
).error,
|
||||
isClosable: true,
|
||||
status: "error",
|
||||
title: "Failed to create transfer request",
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
location.assign(
|
||||
((await createTransferReq.json()) as { url: string }).url,
|
||||
);
|
||||
}}
|
||||
>
|
||||
Continue
|
||||
</Button>
|
||||
<br />
|
||||
<Text pt="16px">
|
||||
If you cannot login at all, please visit the support page and join our
|
||||
server.
|
||||
</Text>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user