Hide more options

I want to only enable google, apple and facebook as login methods on my plug and play modal so I created this loginMethods object and updated the modalConfig when calling initModal.

	const loginMethods = {
		twitter: {
			name: 'twitter',
			showOnModal: false,
		},
		facebook: {
			name: 'facebook',
			showOnModal: true,
		},
		github: {
			name: 'github',
			showOnModal: false,
		},
		reddit: {
			name: 'reddit',
			showOnModal: false,
		},
		discord: {
			name: 'discord',
			showOnModal: false,
		},
		twitch: {
			name: 'twitch',
			showOnModal: false,
		},
		apple: {
			name: 'apple',
			showOnModal: true,
		},
		line: {
			name: 'line',
			showOnModal: false,
		},
		kakao: {
			name: 'kakao',
			showOnModal: false,
		},
		linkedin: {
			name: 'linkedin',
			showOnModal: false,
		},
		weibo: {
			name: 'weibo',
			showOnModal: false,
		},
		wechat: {
			name: 'wechat',
			showOnModal: false,
		},
	};

However, the modal still has this view more option section. Is there a way to remove that part?

@antonio I suggest you look at the Whitelabel Docs for the modal. You can hardcode all other social logins you do not want to display in loginMethod to set the parameter showOnModal: false

The below code snippet will help you change the social logins to showcase as per your choice.

await web3auth.initModal({
  modalConfig: {
    [WALLET_ADAPTERS.OPENLOGIN]: {
      label: "openlogin",
      loginMethods: {
        google: {
          name: "google login",
          logoDark: "url to your custom logo which will shown in dark mode",
        },
        facebook: {
          // it will hide the facebook option from the Web3Auth modal.
          showOnModal: false,
        },
      },
      // setting it to false will hide all social login methods from modal.
      showOnModal: true,
    },
  },
});

I don’t think you fully understood my question. I did already configure and disable the loginMethods I do not want. In fact I disabled all except for 3 social logins.

The question here is, despite only having 3 social logins left there is still this view more options button that used to show the other available social logins but it just doesn’t do anything anymore. It’s a weird UI to have given its not showing or hiding anything anymore.

Thanks for confirming you were able to hide the social logins. I have forwarded your request to our team and we will get back with further updates.

I checked with our team and there is no option to hide this on Modal SDK. Alternatively, you need to use the no-modal SDK to customize the UI the way you want.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.