redirectUri static method

Uri redirectUri({
  1. required Uri native,
  2. Uri? desktop,
})

Choose the browser callback for this platform. Declare the returned URL in auth.providers.google.redirectUris. Native drip builds register its scheme.

Implementation

static Uri redirectUri({required Uri native, Uri? desktop}) {
  if (kIsWeb) return browser.googleSignInReturnUri();
  if (defaultTargetPlatform == TargetPlatform.windows ||
      defaultTargetPlatform == TargetPlatform.linux) {
    if (desktop == null) {
      throw ArgumentError(
        'Provide a configured loopback desktop return URL.',
      );
    }
    return desktop;
  }
  return native;
}