File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
components/server/src/user Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -461,7 +461,6 @@ export class UserService {
461461 }
462462
463463 async deauthorize ( user : User , authProviderId : string ) {
464- const builtInProviders = [ "Public-GitLab" , "Public-GitHub" , "Public-Bitbucket" ] ;
465464 const externalIdentities = user . identities . filter (
466465 ( i ) => i . authProviderId !== TokenService . GITPOD_AUTH_PROVIDER_ID ,
467466 ) ;
@@ -476,10 +475,8 @@ export class UserService {
476475 ( i ) => i !== identity && ( ! this . config . disableDynamicAuthProviderLogin || isBuiltin ( i . authProviderId ) ) ,
477476 ) ;
478477
479- if (
480- remainingLoginIdentities . length === 1 &&
481- ! builtInProviders . includes ( remainingLoginIdentities [ 0 ] . authProviderId )
482- ) {
478+ // Disallow users to deregister the last builtin auth provider's from their user
479+ if ( remainingLoginIdentities . length === 0 ) {
483480 throw new Error (
484481 "Cannot remove last authentication provider for logging in to Gitpod. Please delete account if you want to leave." ,
485482 ) ;
You can’t perform that action at this time.
0 commit comments