1import type { AuthClientPresentationMetadata } from "@t3tools/contracts";
2import * as Device from "expo-device";
3import { Platform } from "react-native";
4
5export function authClientMetadata(appVersion?: string): AuthClientPresentationMetadata {
6 return {
7 label: "The Knife Mobile",
8 deviceType:
9 Device.deviceType === Device.DeviceType.TABLET
10 ? "tablet"
11 : Device.deviceType === Device.DeviceType.PHONE
12 ? "mobile"
13 : "unknown",
14 ...(Platform.OS === "ios" ? { os: "iOS" } : Platform.OS === "android" ? { os: "Android" } : {}),
15 surface: "mobile",
16 ...(appVersion ? { appVersion } : {}),
17 };
18}