Discussions

Ask a Question
Back to All

Adapty react-native/expo paywall login event

Hi, I see that there is an option to add a 'Login' button to the bottom of paywall next to the terms, privacy, restore, etc in the adapty GUI however I do not see any events or documentation on how to know when a user clicks the login button so that I can respond to that event. Any help would be greatly appreciated, I have provided code below to show how I am getting my paywall and a few of the current events that I am using to trigger off of.

const paywall = await adapty.getPaywall(id, locale)
      const view = await createPaywallView(paywall)
      // onPurchaseCompleted for now
      adapty.addEventListener('onLatestProfileLoad', () => {
        loginNavigation.navigate('Login', {
          firstTimeSubscriber: !isPastSubscriber,
        })
      })
      unsubscribe = view.registerEventHandlers({
        onLoadingProductsFailed() {
          setErrorText(
            'Something went wrong, please check your network and try again',
          )
        },
        onPurchaseFailed() {
          setErrorText(
            'Something went wrong, please check your network and try again',
          )
        },
        onRenderingFailed() {
          setErrorText(
            'Something went wrong, please check your network and try again',
          )
        },
        
        // etc, no onLoginClicked() or something similar?