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 {
461
461
}
462
462
463
463
async deauthorize ( user : User , authProviderId : string ) {
464
- const builtInProviders = [ "Public-GitLab" , "Public-GitHub" , "Public-Bitbucket" ] ;
465
464
const externalIdentities = user . identities . filter (
466
465
( i ) => i . authProviderId !== TokenService . GITPOD_AUTH_PROVIDER_ID ,
467
466
) ;
@@ -476,10 +475,8 @@ export class UserService {
476
475
( i ) => i !== identity && ( ! this . config . disableDynamicAuthProviderLogin || isBuiltin ( i . authProviderId ) ) ,
477
476
) ;
478
477
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 ) {
483
480
throw new Error (
484
481
"Cannot remove last authentication provider for logging in to Gitpod. Please delete account if you want to leave." ,
485
482
) ;
You can’t perform that action at this time.
0 commit comments