Sample Code:
String authProviderId = '';//Provide the Auth. Provider Id
String strUserId = '';//Provide the User Id
ThirdPartyAccountLink objTPAL = [ SELECT RemoteIdentifier FROM ThirdPartyAccountLink WHERE UserId =: strUserId ];
//For Facebook use facebook, for Google use google
Boolean checkBool = Auth.AuthToken.revokeAccess( authProviderId, 'open id connect', strUserId, objTPAL.RemoteIdentifier );
system.debug( 'Output Is ' + checkBool );
String authProviderId = '';//Provide the Auth. Provider Id
String strUserId = '';//Provide the User Id
ThirdPartyAccountLink objTPAL = [ SELECT RemoteIdentifier FROM ThirdPartyAccountLink WHERE UserId =: strUserId ];
//For Facebook use facebook, for Google use google
Boolean checkBool = Auth.AuthToken.revokeAccess( authProviderId, 'open id connect', strUserId, objTPAL.RemoteIdentifier );
system.debug( 'Output Is ' + checkBool );