import { LucideAtSign, LucideCircleUserRound, LucideInfo, LucideLogIn, } from "lucide-react"; import { useState } from "react"; import { Button } from "@/components/Animated/Button"; import { UnderlineLink } from "@/components/Animated/UnderlinedLink"; import { Loading } from "@/components/Icons/Loading"; import { useOAuthClient } from "@/lib/oauth"; export const SignIn = () => { const [handle, setHandle] = useState(""); const isValidHandle = handle.includes("."); const client = useOAuthClient(); if (!client) return ; const handleOAuthContinue = () => { localStorage.setItem("handle", handle); const doOAuth = async () => { try { await client.signIn(handle, { ui_locales: "en", signal: new AbortController().signal, }); console.log("Never executed"); } catch (err) { console.log( 'The user aborted the authorization process by navigating "back"', ); } }; doOAuth().catch((e: unknown) => { console.error( "Something went wrong while trying to do OAuth handover.", ); console.error(e); }); }; const loginIcon = ; return (

Sign In

Continue with an{" "} Atmosphere {" "} account

Handle

If you have a Bluesky, Blacksky, Tangled, or any other ATProto account, you can use that account's handle.
setHandle(e.target.value)} />
); };