Yes, that’s what I did. I followed the onboarding process scrupulously.
Le app is 01-Login, it came as a zip, and no, it was not pre-configured, but the tutorial explains how to do.
From auth pov, the login is successful. It’s the redirect that fails. I understand the redirect is meant to allow the client to store the code and state.
I followed Auth0 JavaScript SDK Quickstarts: Add login to your JavaScript App but using the zip, not the code in the tutorial.
Now that I have checked your link, the code has visible differences.
The code on github is similar to the one I received from the zip.
createAuth0Client is called with
{
domain: config.domain,
clientId: config.clientId
}
while in the tutorial it is
auth0.createAuth0Client({
domain: "YOUR_DOMAIN",
clientId: "YOUR_CLIENT_ID",
authorizationParams: {
redirect_uri: window.location.origin
}
Which one is the good one?
Tried again by updating with the code above and resetting browser cache (incognito windows)
same:
User not authenticated
app.js:120 > Parsing redirect E4xI5jBW09lTdHcW2fSGjzy65pSvC9_wdYJsJIJ10e0QU a3NSYWlPYTdtVnRhOX5MSnY3aHNMczVTTWVOcXA1WW9fNkFCT2Vhc2E3RA==
app.js:46 Fetch finished loading: GET “http://localhost:3000/auth_config.json”.
fetchAuthConfig @ app.js:46
configureClient @ app.js:52
window.onload @ app.js:82
load (async)
(anonymous) @ app.js:81
http.ts:13 POST https://dev-s8p4a31fmdaya02c.us.auth0.com/oauth/token 401
T @ http.ts:13
O @ http.ts:33
j @ http.ts:90
method @ http.ts:108
x @ api.ts:22
_requestToken @ Auth0Client.ts:1094
handleRedirectCallback @ Auth0Client.ts:522
window.onload @ app.js:122
load (async)
(anonymous) @ app.js:81
app.js:130 Error parsing redirect: Error: Unauthorized
at method (http.ts:145:11)
at async x (api.ts:22:3)
at async ce._requestToken (Auth0Client.ts:1094:11)
at async ce.handleRedirectCallback (Auth0Client.ts:534:5)
at async window.onload (app.js:122:22)
ui.js:88 UI updated
http.ts:13 Fetch failed loading: POST “https://dev-s8p4a31fmdaya02c.us.auth0.com/oauth/token”.
Weird enough the dashboard says: last login : 2 minutes ago
So the pb is not th elogin but fetching a token after.
Sadly the library doesn’t provide very helpful error messages.
From my POV it’s an error either in the library or in the server.