Please include the following information in your post:
- Which SDK this is regarding: @auth0/auth0-react
- SDK Version: 1.8.0
- Platform Version: React 17.02
I have tried to authenticate by following the docs but receive the following log message in the dashboard:
{
"date": "2021-09-24T11:28:56.182Z",
"type": "f",
"description": "Error: Bad Request",
"connection": "underwriteme-identity-store",
"connection_id": "con_tiS7CX33pSRdeNLd",
"client_id": "S9Ln0isi3k5ns2q5f4uMr0fzr7Lmf0rA",
"client_name": "TM RP test",
"ip": "87.115.60.44",
"user_agent": "Chrome 93.0.4577 / Mac OS X 10.15.7",
"details": {
"body": {},
"qs": {
"state": "J4VniPPIxb1-qyE5vCL9P8ZQV5JikVqR"
},
"connection": "underwriteme-identity-store",
"error": {
"message": "Error: Bad Request",
"oauthError": "access_denied",
"type": "oauth-authorization"
},
"session_id": "Rs9_CghSVY5Y508bOCrvYuw3VpUNqTLC"
},
"hostname": "ume-integration.eu.auth0.com",
"user_id": "auth0|75c8db24-a148-4fcb-8f51-a2359507dd67",
"user_name": "e2e.textmining@underwriteme.co.uk",
"strategy": "auth0",
"strategy_type": "database",
"audience": "https://text-mining-dev.underwriteme.co.uk",
"scope": [
"openid",
"profile",
"email",
"offline_access"
],
"log_id": "90020210924112859087419423927832609099079344584025702498",
"_id": "90020210924112859087419423927832609099079344584025702498",
"isMobile": false
}
I have set up the provider in accordance with the docs like so:
<Auth0Provider
domain="ume-integration.eu.auth0.com"
clientId="S9Ln0isi3k5ns2q5f4uMr0fzr7Lmf0rA"
redirectUri="http://localhost:3000/policy-management"
scope="openid profile email offline_access"
audience="https://text-mining-dev.underwriteme.co.uk"
maxAge={60 * 60 * 24}
useRefreshTokens
cacheLocation="localstorage"
>
I can see the login dialog pop up, I enter my credentials and i successfully get redirected to http://localhost:3000/policy-management
. But he url also contains the error as params:
http://localhost:3000/policy-management?error=access_denied&error_description=Error%3A%20Bad%20Request&state=VnFHNF9BajhuZzhHaTYuejZRcTFia3ROWnZhWXNyaGdDTkRNNmpYUVFZUg%3D%3D
However, when I use the useAuth0
hook user
is undefined
and isAuthenticated
is false.
I have checked my Dashboard settings and it is correctly set to Single Page Application
and None
for Token Endpoint Authentication Method.
Could someone help point out what I may have misconfigured?