Solved: Could not authenticate you from OpenIDConnect because "Undefined method 'with indifferent access' for an instance of string". #5244
|
I couldn't find an answer for this in the Manyfold documentation or in Discussions or Issues, so I thought I'd add it. For anybody else getting this error after hitting the button to sign in with OIDC:
Solution: The error was caused by the OIDC_ISSUER environment variable being set to my OIDC provider's Authorization URL instead of just the base URL of my OIDC provider. Incorrect: Suggestion: Perhaps the Manyfold documentation for OIDC_ISSUER could be updated to include a note that some OIDC providers don't mention an issuer string or URL, but it's simply the base URL for your OIDC provider. I have to applaud the Manyfold team for implementing the OIDC setup in such a simple way. It's basically three variables -- OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, and OIDC_ISSUER -- with a mandatory one more -- MULTIUSER -- and two others that I think are also mandatory -- PUBLIC_HOSTNAME, and HTTPS_ONLY. If you're interested in more detail and how I arrived at the answer: From my basic googling, it appeared that this error typically indicates that the application is expecting a JSON object (or hash/dictionary) from the OIDC Provider's user information endpoint, but is receiving a raw string instead. I could login OK with the local administrator account. My Setup: Pocket ID is my OIDC provider. Pocket ID has been working well with Beszel and Forgejo. Caddy is my reverse proxy. Manyfold docker image: lscr.io/linuxserver/manyfold:latest My Manyfold OIDC-related environment variables: Pocket ID Userinfo URL: https://id.my-domain.com/api/oidc/userinfo I don't believe that Pocket ID offers anything in the way of manipulating the output of the userinfo endpoint, but that wasn't the cause at all. From some more googling I found that somebody had solved the same problem with Pocket ID and MeshCentral. |
Replies: 1 comment
|
That's great, thank you, I'll try to make the documentation clearer on that! |
That's great, thank you, I'll try to make the documentation clearer on that!