How to use the expo-constants.linkingUrl function in expo-constants

To help you get started, we’ve selected a few expo-constants examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sysgears / apollo-universal-starter-kit / modules / authentication / client-react / social / containers / SocialAuthComponent.native.tsx View on Github external
const createAuthRedirectUrl = (authUrl: string): string => {
  const { protocol, hostname, port } = url.parse(__WEBSITE_URL__);
  // Both iOS Simulator and Node backend on iOS use localhost, so no need to use nip.io in this case
  const expoHostname = hostname === 'localhost' ? `localhost` : `${url.parse(Constants.linkingUrl).hostname}.nip.io`;
  const urlHostname = __DEV__ ? expoHostname : hostname;

  return `${protocol}//${urlHostname}${port ? ':' + port : ''}${authUrl}?expoUrl=${encodeURIComponent(
    Constants.linkingUrl
  )}`;
};
github sysgears / apollo-universal-starter-kit / modules / authentication / client-react / social / containers / SocialAuthComponent.native.tsx View on Github external
const createAuthRedirectUrl = (authUrl: string): string => {
  const { protocol, hostname, port } = url.parse(__WEBSITE_URL__);
  // Both iOS Simulator and Node backend on iOS use localhost, so no need to use nip.io in this case
  const expoHostname = hostname === 'localhost' ? `localhost` : `${url.parse(Constants.linkingUrl).hostname}.nip.io`;
  const urlHostname = __DEV__ ? expoHostname : hostname;

  return `${protocol}//${urlHostname}${port ? ':' + port : ''}${authUrl}?expoUrl=${encodeURIComponent(
    Constants.linkingUrl
  )}`;
};
github flow-typed / flow-typed / definitions / npm / expo-constants_v4.x.x / flow_v0.69.0-v0.103.x / test_expo-constants.js View on Github external
it('should have other props', () => {
    (Constants.deviceId: ?string);
    (Constants.linkingUrl: ?string);
  });
github sysgears / apollo-universal-starter-kit / modules / authentication / client-react / helpers / index.js View on Github external
export default function buildRedirectUrlForMobile(authType) {
  const { protocol, hostname, port } = url.parse(__WEBSITE_URL__);
  const expoHostname = `${url.parse(Constants.linkingUrl).hostname}.nip.io`;
  const urlHostname = __DEV__ ? expoHostname : hostname;

  return `${protocol}//${urlHostname}${port ? ':' + port : ''}/auth/${authType}?expoUrl=${encodeURIComponent(
    Constants.linkingUrl
  )}`;
}
github sysgears / apollo-universal-starter-kit / modules / authentication / client-react / helpers / index.js View on Github external
export default function buildRedirectUrlForMobile(authType) {
  const { protocol, hostname, port } = url.parse(__WEBSITE_URL__);
  const expoHostname = `${url.parse(Constants.linkingUrl).hostname}.nip.io`;
  const urlHostname = __DEV__ ? expoHostname : hostname;

  return `${protocol}//${urlHostname}${port ? ':' + port : ''}/auth/${authType}?expoUrl=${encodeURIComponent(
    Constants.linkingUrl
  )}`;
}