nextcloud / nextcloud/user_oidc
Getting 502 sometimes on login and always on logout
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 181
- Forks
- 60
- Avg merge
- 7h 34m
- Merged PRs (30d)
- 26
Description
After changing the IdP domain I am getting a 502 after the redirection from Authentik with the link https://domain.tld/apps/user_oidc/sls?requesttoken=rjOEcLJdZwWVZWO36qJmrJn/xxxxxxxqt4avU%3D:y3LRQuocSGT3TlLbptgjxdvItdy0xxxBJLI%3D
but only sometimes on login, but i seem to be logged in because when I visit NC with the base url after that I am logged in.
But logging out always produces the 502 aswell.
The logs only show this
Fehler | user_oidc | Impossible to decode OIDC token:Error: kid must be provided in JWT header.
and
OC\Authentication\Exceptions\InvalidTokenException: Token does not exist: token does not exist
I am running NC with Authentik on another install and it is working flawlessly there. Any hints on getting it debugged further?
The console logs of Authentik and NC dont show anything interesting regarding this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The reported entry points are the user_oidc login redirect and logout flow; reproduce both after changing the IdP domain while collecting the user_oidc and Nextcloud logs. Use the “kid must be provided in JWT header” and “Token does not exist” errors to trace the failure, with completion shown by login and logout no longer returning 502.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100