Repository navigation
Description
👟 Reproduction steps
I have self-hosted authentik and appwrite via Docker. I am now trying to use authentik as may oauth2 provider. The problem is, that the auth url appwrite is sending the auth request to seems not to be correct.
The problem seems to be in this function from
/Authentik.php
public function getLoginURL(): string
{
return 'https://' . $this->getAuthentikDomain() . '/application/o/authorize?' . \http_build_query([
'client_id' => $this->appID,
'redirect_uri' => $this->callback,
'state' => \json_encode($this->state),
'scope' => \implode(' ', $this->getScopes()),
'response_type' => 'code'
]);
}
the URL should have an additional "/" to look like this: "'/application/o/authorize/?'"
I have set up an auth provider in authentik

And added the details into appwrite auth.

My web app makes an auth request an I land on my auth url, but Authentik complains, with a not found error.
I took a look at the url and noticed that it's different from what authentik wants. I manualy added a "/" after the "authorize" and was correctly authenticated and send back to my webapp with a valid session.
👍 Expected behavior
Get sent to Authentik, Login and redirected back to my application
👎 Actual Behavior
Authentik does recognize the app_id and is stuck with a not found error.
🎲 Appwrite version
Version 1.6.x
💻 Operating system
Linux
🧱 Your Environment
Appwirte Version 1.6 with docker.
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct

Activity
Voxel07 commentedon Sep 4, 2025
This is such a simple change. Why is this taking so long?
tromphakvoort commentedon Nov 4, 2025
Is there an update on the fix of this issue? Or is there an alternative for it?
Voxel07 commentedon Nov 4, 2025
I asked them in one of their Discord Q&As about this. The answer was basically that this seems not to be a wide spread issue and they need more cases to evaluate the Problem.
I switched to PocketBase for my personal project.
funar commentedon Dec 12, 2025
Any updates on this? I modified the source for now, but I'd prefer an official fix. It's just a trailing /
maxmir20 commentedon Jan 26, 2026
Also highlighting this issue as well. Hoping someone addresses it soon
funar commentedon Jan 26, 2026
If you're using nginx as a proxy in front of Authentik, this works:
abishekgiri commentedon Mar 31, 2026
Hi, I'd like to work on this issue. Could I be assigned?
abishekgiri commentedon Apr 16, 2026
Hi, I’d like to work on this issue. Could I be assigned?
fix: correct Authentik authorize URL (appwrite#9567)
rajkumar187 commentedon Jul 1, 2026
Hi! I'd like to work on this issue. From reading
src/Appwrite/Auth/OAuth2/Authentik.php,getLoginURL()builds the URL as/application/o/authorize?...— adding the trailing slash to make it/application/o/authorize/?...should resolve the 404. Could this be assigned to me? Thanks!rajkumar0932 commentedon Jul 1, 2026
Hi! I'd like to work on this issue. From reading
src/Appwrite/Auth/OAuth2/Authentik.php,getLoginURL()builds the URL as/application/o/authorize?...— adding the trailing slash to make it/application/o/authorize/?...(matching the token and userinfo endpoints in the same file, which already have it) should resolve the 404. Could this be assigned to me? Thanks!