Syntax error in generated code in Spring MVC quick start tutorial

To reproduce:

  1. Go to https://manage.auth0.com/#/clients
  2. Create new client
  3. Click on the name of your created client–>Quick Start–>Java Spring MVC

The first syntax error is Javascript code and can be fond under Authenticate the User. On line 29:

redirectUrl: '${fn:replace(pageContext.request.requestURL, pageContext.request.requestURI, '')}http://localhost:3099/callback',

I don’t know Javascript but any Javascript editor should display an error message on that line.

The second syntax error can found under Display User Information on line 6:

logger.info("Principal name: "  user.getName());

where + has been left out before user.getName().

I first didn’t notice any syntax errors but when running this sample project, I could’t login from http://localhost:3099/login - after clicking login I was redirected to https://druvid.eu.auth0.com/login/callback which said “Callback URL mismatch. The url “http://localhost:3099http://localhost:3099/callback” is not in the list of allowed callback.” Yes, the URL was duplicated for some reason. Is the first syntax error the cause of this? I’m new to Spring and Auth0 and I don’t how to fix this. I also read and followed the Java quick start tutorial for which the login worked fine. I’m trying to get this working with Spring though, so any help is appreciated. Sorry for not providing any logs but just let me know if there are any logs or anything else you need.

I followed the steps you mentioned and was not able to reproduce the issue. I may have missed something or this has already been fixed given the code sample that was downloaded for Java Spring MVC when I did those steps did not include the exact code you mentioned suggesting that the code was updated meanwhile.

I just checked and the tutorial has indeed been updated. :slight_smile:

I just checked and the tutorial has indeed been updated. :slight_smile: