Honor the client registration override only in setup and recovery
The recovery administrator signs in before any OAuth client is registered, so it needs to skip the registration check. Outside bootstrap and recovery mode, every account now signs in through a registered client and one of its redirect URIs.
This commit is contained in:
@@ -270,8 +270,12 @@ impl ClientRegistrationHandler for Server {
|
|||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check if the account is allowed to override client registration
|
// Check if the account is allowed to override client registration.
|
||||||
if self
|
// inbuxa: only while setting up or recovering, when the recovery
|
||||||
|
// administrator signs in before any client is registered (contract C-5)
|
||||||
|
let registry = self.registry();
|
||||||
|
if (registry.is_bootstrap_mode() || registry.is_recovery_mode())
|
||||||
|
&& self
|
||||||
.access_token(account_id)
|
.access_token(account_id)
|
||||||
.await
|
.await
|
||||||
.caused_by(trc::location!())?
|
.caused_by(trc::location!())?
|
||||||
|
|||||||
Reference in New Issue
Block a user