Hello everyone,
Struggling to get past the error mentioned in the topic… I have gone through various similar posts for this error and understand the issue is usually a typo. However, I have tried to copy-paste from the docs as much as possible explicitly. That being said, I cannot identify what is wrong with my code! I would appreciate any guidance and am willing to share any other info needed. I really appreciate any help you can provide.
Apologies in advance. I did not understand which tags fit this situation!
This is the error log:
{
"date": "2023-02-10T22:55:48.384Z",
"type": "f",
"description": "Unable to issue redirect for OAuth 2.0 transaction",
"connection": "github-users-db",
"connection_id": "con_M0Iq03c8kVDZQeMm",
"client_id": "dF0awL5MjYges1UFPRBj7Qs1Mt4W0LKL",
"client_name": "Github Users",
"ip": "2603:8080:7300:97a:9481:e844:c78c:ccd9",
"user_agent": "Chrome 109.0.0 / Windows 10.0.0",
"details": {
"body": {},
"qs": {
"state": "eJwcEpB_1uKG0irzcsPDPQP-XaANXfCp"
},
"connection": "github-users-db",
"error": {
"message": "Unable to issue redirect for OAuth 2.0 transaction",
"oauthError": "server_error",
"type": "oauth-authorization"
},
"session_id": "2-iS9_z0C-2CTxgHOqD6MfIKlJhY-eqh"
},
"hostname": "dev-yhy2r863cr3afldj.us.auth0.com",
"user_id": "auth0|63e5341674eb8928e0b4327c",
"user_name": "adamdenais@gmail.com",
"strategy": "auth0",
"strategy_type": "database",
"audience": "https://dev-yhy2r863cr3afldj.us.auth0.com/userinfo",
"scope": [
"openid",
"profile",
"email"
],
"log_id": "90020230210225549617889504823857192080197423698976702482",
"_id": "90020230210225549617889504823857192080197423698976702482",
"isMobile": false,
"id": "90020230210225549617889504823857192080197423698976702482"
}
This is my index.js code:
import { Auth0Provider } from "@auth0/auth0-react";
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<Auth0Provider
domain="dev-yhy2r863cr3afldj.us.auth0.com"
clientId="dF0awL5MjYges1UFPRBj7Qs1Mt4W0LKL"
authorizationParams={{
redirect_uri: window.location.origin
}}
>
<GithubProvider>
<App />
</GithubProvider>
</Auth0Provider>
</React.StrictMode>
);
This is my related login code in my Navbar component:
import { useAuth0 } from "@auth0/auth0-react";
const Navbar = () => {
const { loginWithRedirect } =
useAuth0();
return (
<button onClick={() => loginWithRedirect()}>Login</button>
);
};