I wanted to use a custom domain for my universal login and have successfully configured it with it saying the following message-“Your domain is configured correctly.”
Let us assume my default domain is dev-xxxxx.auth0.com and my custom domain is johndoe.com
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App.jsx";
import "./index.css";
import { Auth0Provider } from "@auth0/auth0-react";
document.documentElement.classList.add("dark");
const domain = import.meta.env.VITE_AUTH0_DOMAIN;
const clientId = import.meta.env.VITE_AUTH0_CLIENT_ID;
ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
<Auth0Provider
domain={domain}
clientId={clientId}
authorizationParams={{
redirect_uri: window.location.origin,
scope: 'openid profile email phone',
audience: `https://${domain}/api/v2/`,
}}
useRefreshTokens={true}
cacheLocation="localstorage"
>
<App />
</Auth0Provider>
</React.StrictMode>
);
I have replaced my domain with johndoe.com in my .env file. I was wondering as to why it is not being reflected when running my Localhost and clicking on the login button( i get redirected to -http://localhost:5173/?error=access_denied&error_description=Service%20not%20found%3A%20https%3A…). I don’t know what additional configuration is required for my main.jsx React Auth0 Context component.