Session Problem When Sessions Loaded Before Community Auth Loads

It was brought to my attention that there was a problem with sessions when something else loads sessions before Community Auth loads its dependencies:

Error Number: 1048
Column ‘id’ cannot be null
INSERT INTO `auth_sessions` (`id`, `user_id`, `login_time`, `ip_address`, `user_agent`) VALUES (NULL, ‘412049668’, ‘2017-08-31 10:57:57’, ‘127.0.0.1’, ‘Firefox 55.0 on Linux’)
Filename: third_party/community_auth/models/Auth_model.php
Line Number: 90

When some other library sets up the session before MY_Session can be loaded (because there is no package path to it), the important session ID is never passed back (because the method was not overridden), resulting in NULL. You can fix this by autoloading the Community Auth package path in config/autoload.php:

$autoload['packages'] = array(APPPATH . 'third_party/community_auth/');