Login on Safari

Hey :wave:

I have implemented Auth0 like this.
This setup works on Chrome but on Safari/Firefox it constantly logs me out.

Any of you have seen it before?

(here’s my Next.js code snippet)

export default function App({ Component, pageProps, auth }) {
  if (typeof window === 'undefined') {
    return <></>
}

  return (
        <Auth0Provider
          domain={auth.domain}
          clientId={auth.clientId}
          redirectUri={window.location.origin}
          audience={auth.audience}
          scope="read:current_user"
        >
          <Component {...pageProps} />
        </Auth0Provider>
  )
}

App.getInitialProps = async () => {
  const clientId = process.env.AUTH0_CLIENT_ID
  const domain = process.env.AUTH0_DOMAIN
  const audience = `https://${domain}/api/v2/`

  return {
    auth: {
      clientId,
      domain,
      audience,
    },
  }
}

Hi @nick74,

Welcome to the Auth0 Community!

What package and version are you using? It looks like you implementation is quite a bit different then our Next Quickstart.

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