In OAuth, you can receive a request to the redirect_uri with the parameter error, this can happen for a variety of reasons, but the most common one is "the user has denied access", in this case the error parameter will be set to access_denied
I believe it's a case of adding in logic like:
let error = callbackURL.queryItems?.first(where: { $0.name == "error" })?.value
if let error = error {
switch error.lowercased() {
case "access_denied":
throw AuthenticatorError.accessDenied
default:
// We do actually have error and error_description parameters, so
// could create a more specific error than missingAuthorizationCode
throw AuthenticatorError.missingAuthorizationCode
}
}
Likely to the performUserAuthentication(manual: Bool, userAuthenticator: UserAuthenticator) method, after it has invoked userAuthenticator.
At present, the error you get is just the AuthenticatorError.missingAuthorizationCode raised in, for example, the Bluesky service, due to missing parameters (code, iss, or state).
In OAuth, you can receive a request to the
redirect_uriwith the parametererror, this can happen for a variety of reasons, but the most common one is "the user has denied access", in this case theerrorparameter will be set toaccess_deniedI believe it's a case of adding in logic like:
Likely to the
performUserAuthentication(manual: Bool, userAuthenticator: UserAuthenticator)method, after it has invokeduserAuthenticator.At present, the error you get is just the
AuthenticatorError.missingAuthorizationCoderaised in, for example, the Bluesky service, due to missing parameters (code,iss, orstate).