outline-server icon indicating copy to clipboard operation
outline-server copied to clipboard

Getting an error trying to login using Keycloak

Open oomchiller opened this issue 3 years ago • 4 comments

I use npm as a proxy and keycloak as auth provider. Once i try to login to Outline, it says Authentication failed - we were unable to sign you in at this time. Please try again.

In outline docker container logs i saw this:

{"label":"http","level":"info","message":"  <-- GET /auth/oidc.callback?state=0fb446395aa04fe9&session_state=887ececf-9c62-4a43-9d10-bd1c0077fe0c&code=9ecbc9cf-eb8c-4989-b763-2786be74d100.887ececf-9c62-4a43-9d10-bd1c0077fe0c.a43d5ed5-a0e1-4f78-ae1d-fbf2fdc62bde"}
{"error":"Failed to obtain access token","stack":
"InternalOAuthError: Failed to obtain access token  
at OAuth2Strategy._createOAuthError (/opt/outline/node_modules/passport-oauth2/lib/strategy.js  
at /opt/outline/node_modules/passport-oauth2/lib/strategy.js
at /opt/outline/node_modules/oauth/lib/oauth2.js
at ClientRequest.<anonymous> (/opt/outline/node_modules/oauth/lib/oauth2.js
at ClientRequest.emit (node:events:526:28)    
at ClientRequest.emit (node:domain:475:12)  
at TLSSocket.socketErrorListener (node:_http_client:442:9)  
at TLSSocket.emit (node:events:526:28)
at TLSSocket.emit (node:domain:475:12) 
at emitErrorNT (node:internal/streams/destroy:157:8)    
at emitErrorCloseNT (node:internal/streams/destroy:122:3)    
at processTicksAndRejections (node:internal/process/task_queues:83:21)","level":"error","message":"Error during authentication"}
{"label":"http","level":"info","message":"  --> GET /auth/oidc.callback?state=0fb446395aa04fe9&session_state=887ececf-9c62-4a43-9d10-bd1c0077fe0c&code=9ecbc9cf-eb8c-4989-b763-2786be74d100.887ececf-9c62-4a43-9d10-bd1c0077fe0c.a43d5ed5-a0e1-4f78-ae1d-fbf2fdc62bde 302 120ms 69b"}

Maybe this is a result of using a self-signed SSL certificate? How i can solve this problem?

oomchiller avatar Apr 13 '23 09:04 oomchiller

Thank you for reaching out! Please contact us at support.getoutline.org and include the GitHub issue number so that we can better support your needs.

If you haven’t already, check out the Outline Support Site at support.getoutline.org for access to help articles and more.

rohanmehra20 avatar Apr 21 '23 15:04 rohanmehra20

Problem solved

oomchiller avatar Apr 27 '23 10:04 oomchiller

hello @iwanmikhajlov could you please provide me with the tutorial you used to integrate outline with keycloak ? because i can't find anything in the docs.

ziadkiwan avatar May 12 '23 06:05 ziadkiwan

hello @iwanmikhajlov could you please provide me with the tutorial you used to integrate outline with keycloak ? because i can't find anything in the docs.

Hi. I used this tutorial https://typaknote.ru/ustanovka-outline-s-podkliuchieniiem-oidc-keycloak/ but it's in russian, so you might use google translate. This is not an official way to integrate Keycloak OIDC, but for me it works just fine.

oomchiller avatar May 18 '23 18:05 oomchiller