MCPcopy Index your code
hub / github.com/NativeScript/firebase / show

Method show

packages/firebase-ui/index.android.ts:670–718  ·  view source on GitHub ↗
(config: Config)

Source from the content-addressed store, hash-verified

668 }
669
670 show(config: Config) {
671 return new Promise<IIdpResponse>((resolve, reject) => {
672 try {
673 const builder = this.native.createSignInIntentBuilder();
674 if (config.providers.length > 0) {
675 const providers = new java.util.ArrayList();
676 config.providers.forEach((provider) => {
677 providers.add(provider.getNative(this));
678 });
679 builder.setAvailableProviders(providers);
680 }
681
682 if (config.anonymousUsersAutoUpgrade) {
683 builder.enableAnonymousUsersAutoUpgrade();
684 }
685 if (config.emailLink) {
686 builder.setEmailLink(config.emailLink);
687 }
688
689 if (config.resetPasswordSettings) {
690 builder.setResetPasswordSettings((config.resetPasswordSettings as ActionCodeSettings).native);
691 }
692
693 if (typeof config.theme === 'number') {
694 builder.setTheme(config.theme);
695 }
696
697 if (typeof config.lockOrientation === 'boolean') {
698 builder.setLockOrientation(config.lockOrientation);
699 }
700
701 if (config.tosAndPrivacyPolicy?.tos && config.tosAndPrivacyPolicy?.privacyPolicy) {
702 builder.setTosAndPrivacyPolicyUrls(config.tosAndPrivacyPolicy?.tos, config.tosAndPrivacyPolicy?.privacyPolicy);
703 }
704 if (config.alwaysShowSignInMethodScreen) {
705 builder.setAlwaysShowSignInMethodScreen(config.alwaysShowSignInMethodScreen);
706 }
707
708 const intent = builder.build();
709 _launcherResolve = resolve;
710 _launcherReject = reject;
711 signInLauncher.launch(intent);
712 } catch (error) {
713 reject(new FirebaseError(error?.message || 'Failed to show UI'));
714 _launcherResolve = null;
715 _launcherReject = null;
716 }
717 });
718 }
719
720 delete() {
721 return new Promise<void>((resolve, reject) => {

Callers

nothing calls this directly

Calls 3

forEachMethod · 0.65
addMethod · 0.65
getNativeMethod · 0.65

Tested by

no test coverage detected