A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
feat(mobile): add signup support to the mobile app
Mohamed Bassem5cb730692492
diff --git a/apps/mobile/app/signin.tsx b/apps/mobile/app/signin.tsxindex 00295cf4..94a57822 100644--- a/apps/mobile/app/signin.tsx+++ b/apps/mobile/app/signin.tsx@@ -7,6 +7,7 @@ import {View,} from "react-native";import { Redirect, useRouter } from "expo-router";+import * as WebBrowser from "expo-web-browser";import Logo from "@/components/Logo";import { TailwindResolver } from "@/components/TailwindResolver";import { Button } from "@/components/ui/Button";@@ -27,7 +28,6 @@ export default function Signin() {const { settings, setSettings } = useAppSettings();const router = useRouter();const api = useTRPC();-const [error, setError] = useState<string | undefined>();const [loginType, setLoginType] = useState<LoginType>(LoginType.Password);@@ -82,6 +82,13 @@ export default function Signin() {return <Redirect href="dashboard" />;}+ const onSignUp = async () => {+ const serverAddress = settings.address ?? "https://cloud.karakeep.app";+ const signupUrl = `${serverAddress}/signup?redirectUrl=${encodeURIComponent("karakeep://signin")}`;++ await WebBrowser.openAuthSessionAsync(signupUrl, "karakeep://signin");+ };+const onSignin = () => {if (!settings.address) {setError("Server address is required");@@ -228,6 +235,12 @@ export default function Signin() {: "Use password instead?"}</Text></Pressable>+ <Pressable onPress={onSignUp}>+ <Text className="mt-4 text-center text-gray-500">+ Don't have an account?{" "}+ <Text className="text-foreground underline">Sign Up</Text>+ </Text>+ </Pressable></View></TouchableWithoutFeedback></KeyboardAvoidingView>