handleRedirectCallback fails on Safari browser

Hi community, we are using loginWithRedirection and handleRedirectCallback methods to login,

if (!isAuthenticated && !code) {
      if (returnUrl) localStorage.setItem('returnUrl', returnUrl)
      if (returnParams) localStorage.setItem('returnParams', JSON.stringify(returnParams))
      if (newQuery) localStorage.setItem('query', JSON.stringify(newQuery))

      await this.$auth0.loginWithRedirect({
        authorizationParams: {
          redirect_uri: window.location.origin
        }
      })
      return
    }

    if (!isAuthenticated && code) {
      const storedReturnUrl = localStorage.getItem('returnUrl')
      const storedReturnParams = localStorage.getItem('returnParams')
      const storedQuery = localStorage.getItem('query')

      if (storedReturnUrl) returnUrl = storedReturnUrl
      if (storedReturnParams) returnParams = JSON.parse(storedReturnParams)
      if (storedQuery) newQuery = JSON.parse(storedQuery)

      await this.$auth0.handleRedirectCallback()
    }

this works as expected on Chrome and Firefox but in Safari we get the following error when we call ‘handleRedirectCallback’:

TypeError: undefined is not an object (evaluating ‘e.split’)

In our prod env we have a custom auth domain but the issue happen on dev and prod envs.

Hey there @jmgayosso welcome to the community!

Interesting - Which SDK and version are you using? Are you able to share how you’ve configured Auth0Client or Auth0Provider? Do you have any rules/Actions in place in your tenant that could be interfering? Given that everything is functioning as expected in other browsers, there might be a setting in Safari causing issues.

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