Hey all,
I’m using the auth0 react package. Pretty simple log in flow. Standard stuff.
I have a super odd bug, which is sometimes triggered, and sometimes not. Users will try to click on a button that has the onClick={loginWithRedirect}, and nothing will happen. No console output, nothing to sentry, there is no error at all. The button simply doesn’t do anything. It’s difficult to recreate, as we don’t know what causes it, but it affects a decent amount (5-10% of our users). My suspicion is adblock or antivirus, but sometimes after disabling those, it still occurs.
Below is the code we use:
<AwesomeButton
type='primary'
style={{
"--button-primary-color": "#7c55d6",
"--button-primary-color-dark": "#6444ad",
"--button-primary-color-light": "#fff",
"--button-primary-color-hover": "#6444ad",
"--button-primary-color-active": "#6444ad",
}}
onPress={() =>
loginWithRedirect({
screen_hint: "login",
mode: "login",
})
}
>
Log in
</AwesomeButton>
const root = ReactDOM.createRoot(document.getElementById("root"))
root.render(
<BrowserRouter>
<Auth0Provider
domain={process.env.REACT_APP_AUTH0_DOMAIN}
clientId={process.env.REACT_APP_AUTH0_CLIENT_ID}
redirectUri={process.env.REACT_APP_REDIRECT_URI}
audience={process.env.REACT_APP_AUDIENCE}
scope='read:current_user'
useRefreshTokens={true}
cacheLocation='localstorage'
>
<App />
<Toaster />
</Auth0Provider>
</BrowserRouter>
)
Anybody faced this problem using React login before?
Frontend service is Vercel, environment variables are definitely set.
Any help at all please?