fix: clearer login error for security-key (passkey) accounts (#82)

Bump ForgejoKit to 0.8.1, which classifies Forgejo's "Basic authorization
is not allowed while having security keys enrolled" 401 as a dedicated
error instead of "Invalid username or password". Accounts with a passkey
or security key now get told to use a personal access token.

Add the new .basicAuthBlockedBySecurityKey case to the session-restore
error mapping (routed through the auth-category path like other 401s).

Closes #78

Reviewed-on: https://codeberg.org/secana/Forji/pulls/82
This commit is contained in:
Stefan Hausotte 2026-06-15 18:49:46 +02:00 committed by secana
parent 64145f50cc
commit c5893ff638
3 changed files with 4 additions and 4 deletions

View file

@ -639,7 +639,7 @@
repositoryURL = "https://codeberg.org/secana/ForgejoKit.git";
requirement = {
kind = exactVersion;
version = 0.8.0;
version = 0.8.1;
};
};
DEC49F6B2F3D00C700E7DD54 /* XCRemoteSwiftPackageReference "textual" */ = {

View file

@ -6,8 +6,8 @@
"kind" : "remoteSourceControl",
"location" : "https://codeberg.org/secana/ForgejoKit.git",
"state" : {
"revision" : "485c147e7f9762c06f51029de47464fb41abc4af",
"version" : "0.8.0"
"revision" : "7675312f5ca302968e267aad632bec4c76414e06",
"version" : "0.8.1"
}
},
{

View file

@ -269,7 +269,7 @@ enum SessionRestoreError: LocalizedError, Equatable {
.invalidServerResponse
case .invalidURL:
.serverNotFound
case .invalidCredentials, .otpRequired, .serverNotFound, .unknownError:
case .invalidCredentials, .otpRequired, .basicAuthBlockedBySecurityKey, .serverNotFound, .unknownError:
fromHTTPErrorCategory(error.httpErrorCategory, statusCode: error.httpStatusCode)
}
}