diff --git a/shatter-mobile/assets/images/adaptive-icon.png b/shatter-mobile/assets/images/adaptive-icon.png index e8d5ce8..29b49ad 100644 Binary files a/shatter-mobile/assets/images/adaptive-icon.png and b/shatter-mobile/assets/images/adaptive-icon.png differ diff --git a/shatter-mobile/assets/images/icon.png b/shatter-mobile/assets/images/icon.png index e8d5ce8..76149bd 100644 Binary files a/shatter-mobile/assets/images/icon.png and b/shatter-mobile/assets/images/icon.png differ diff --git a/shatter-mobile/assets/images/splash-icon.png b/shatter-mobile/assets/images/splash-icon.png index e8d5ce8..9da6c74 100644 Binary files a/shatter-mobile/assets/images/splash-icon.png and b/shatter-mobile/assets/images/splash-icon.png differ diff --git a/shatter-mobile/src/services/linkedin_auth.service.ts b/shatter-mobile/src/services/linkedin_auth.service.ts index 55a9183..1bb6891 100644 --- a/shatter-mobile/src/services/linkedin_auth.service.ts +++ b/shatter-mobile/src/services/linkedin_auth.service.ts @@ -1,3 +1,4 @@ +import * as Linking from "expo-linking"; import * as WebBrowser from "expo-web-browser"; import { User } from "../interfaces/User"; import { exchangeLinkedInCode, userFetch } from "./user.service"; @@ -14,11 +15,11 @@ export async function loginWithLinkedIn(): Promise< if (result.type !== "success") return null; - const url = new URL(result.url); - const errorMessage = url.searchParams.get("message"); + const { queryParams } = Linking.parse(result.url); + const errorMessage = queryParams?.message as string | undefined; if (errorMessage) throw new Error(errorMessage); - const code = url.searchParams.get("code"); + const code = queryParams?.code as string | undefined; if (!code) return null; const { userId, token } = await exchangeLinkedInCode(code);