Getting an error trying to login using Keycloak
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?
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.
Problem solved
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.
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.