UNPKG

@equinor/mad-core

Version:

Core library for the Mobile App Delivery team

17 lines (15 loc) 504 B
// src/utils/getRedirectUriFromAuthConfig.ts import { Platform } from "react-native"; var getRedirectUriFromAuthConfig = (redirectUri, redirectUriWeb) => { if (Platform.OS === "web") { if (!redirectUriWeb) throw new Error( "Looks like you started your application for web, but you have not registered a redirect URI for web. Please add a 'redirectUriWeb' to your mad config" ); return redirectUriWeb; } return redirectUri; }; export { getRedirectUriFromAuthConfig };