aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2026-02-01 17:31:24 +0000
committerMohamed Bassem <me@mbassem.com>2026-02-01 17:31:24 +0000
commit5cb7306924925206d543f9d499447314d8026095 (patch)
tree5cff5baf28ac3cda794b9c4cddcdf949f12d5681 /apps
parent4051594b2f410f01e883febad22eb9001a84f90e (diff)
downloadkarakeep-5cb7306924925206d543f9d499447314d8026095.tar.zst
feat(mobile): add signup support to the mobile app
Diffstat (limited to 'apps')
-rw-r--r--apps/mobile/app/signin.tsx15
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/mobile/app/signin.tsx b/apps/mobile/app/signin.tsx
index 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&apos;t have an account?{" "}
+ <Text className="text-foreground underline">Sign Up</Text>
+ </Text>
+ </Pressable>
</View>
</TouchableWithoutFeedback>
</KeyboardAvoidingView>