Google oauth2.0 405 error

Hello,

I have a Regular Web Application, and I am trying to apply Auth0 authentication using my google accounts. My app is set as Regular Web Application, and Token Endpoint Authentication Method = POST

I am getting 405 Error when auth0 is redirecting back to my app.

http://localhost:8080/ 405
accounts.google.ca/accounts/SetSID:<number>

Completed 405 METHOD_NOT_ALLOWED
 Mapped to public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
"ERROR" dispatch for GET "/error", parameters={}
Mapped to public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
Selected 'text/html' given [text/html, text/html;q=0.8]
 Exiting from "ERROR" dispatch, status 405

Thanks for any help.

Welcome to community @luis2,

Can you please provide some more details, that would help in underdstanding the issue in detail.

What’s your configured callback URL? I assume http://localhost:8080/ ?

Please post the code of the Spring controller class that handles this URL (/). Does it allow the POST method? Because that’s basically what the error message states. I guess it currently only allows for GET.

Thank you guys so much for your attention. I had found that someone made a mistake creating the endpoints using RequestMapping “/api/v1” wrongly from the Controllers, creating extra GETs outside of the authentication.

2 Likes

Glad you found the issue.

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.