Message Boards

OpenIdConnect with auth0 - error on application callback

Susie AB, modified 2 Years ago.

OpenIdConnect with auth0 - error on application callback

New Member Posts: 3 Join Date: 6/21/21 Recent Posts

New to LR and OpenIdCOnnect. I have encountered a problem implementing openidconnect authorization flow in liferay 7.4. Everything works untill the step, where the provider redirects back to liferay with the code to exchange for tokens:

http://localhost:8080/c/portal/login/openidconnect?code=xxxxxxxx

Application throws: 'Internal Server Error: An error occurred while accessing the requested resource.'

Any idea whats going on?

------------------------------------

//stack trace

javax.servlet.ServletException: java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed
        at com.liferay.portal.struts.PortalRequestProcessor._process(PortalRequestProcessor.java:420) ~[portal-impl.jar:?]
        at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:153) ~[portal-impl.jar:?]
        at com.liferay.portal.internal.servlet.MainServlet.doGet(MainServlet.java:207) ~[portal-impl.jar:?]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) ~[servlet-api.jar:4.0.FR]
        at com.liferay.portal.internal.servlet.MainServlet.service(MainServlet.java:643) ~[portal-impl.jar:?]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[servlet-api.jar:4.0.FR]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[catalina.jar:9.0.43]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.43]
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.43]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.43]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.43]
        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124) ~[portal-kernel.jar:?]
        at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147) ~[portal-kernel.jar:?]
        at com.liferay.portal.security.sso.openid.connect.internal.service.filter.OpenIdConnectSessionValidationFilter.processFilter(OpenIdConnectSessionValidationFilter.java:124) ~[?:?]

//my provider registration in LR:

Provider Name: auth0
OpenID Connect Client ID: xxx (edit)
OpenID connect client secret: xxx (edit)
Scopes: openid email profile
Discovery Endpoint: https://dev-qbnu56pq.eu.auth0.com/.well-known/openid-configuration
Discovery Endpoint Cache in Milliseconds:360000
Authorization Endpoint: https://dev-qbnu56pq.eu.auth0.com/authorize
Issuer URL: https://dev-qbnu56pq.eu.auth0.com/.well-known/openid-configuration
JWKS URI: https://dev-qbnu56pq.eu.auth0.com/.well-known/jwks.json
ID Token Signing Algorithms: RS256
Subject Types: public
Token Endpoint: https://dev-qbnu56pq.eu.auth0.com/oauth/token
Token Connection Timeout in Milliseconds: 1000

 

//My Auth0 endpoints

OAuth Authorization URL
https://dev-qbnu56pq.eu.auth0.com/authorize

Device Authorization URL
https://dev-qbnu56pq.eu.auth0.com/oauth/device/code

OAuth Token URL
https://dev-qbnu56pq.eu.auth0.com/oauth/token

OAuth User Info URL
https://dev-qbnu56pq.eu.auth0.com/userinfo

OpenID Configuration
https://dev-qbnu56pq.eu.auth0.com/.well-known/openid-configuration

JSON Web Key Set
https://dev-qbnu56pq.eu.auth0.com/.well-known/jwks.json