diff --git a/clientapi/routing/register.go b/clientapi/routing/register.go index 614e19d50..9e09d74d4 100644 --- a/clientapi/routing/register.go +++ b/clientapi/routing/register.go @@ -591,9 +591,10 @@ func handleRegistrationFlow( accessToken, accessTokenErr := auth.ExtractAccessToken(req) // Appservices are special and are not affected by disabled - // registration or user exclusivity. - if r.Auth.Type == authtypes.LoginTypeApplicationService || - (r.Auth.Type == "" && accessTokenErr == nil) { + // registration or user exclusivity. We'll go onto the appservice + // registration flow if a valid access token was provided or if + // the login type specifically requests it. + if r.Auth.Type == authtypes.LoginTypeApplicationService || accessTokenErr == nil { return handleApplicationServiceRegistration( accessToken, accessTokenErr, req, r, cfg, userAPI, )