California Gov. Jerry Brown signed legislation adding the prohibitions to the State's Labor Code in September.

The two states join Maryland, Michigan, New Jersey and Delaware in implementing such privacy laws.

The state laws were prompted by privacy and worker advocates concerned that some employers were asking job seekers and employees for access to their personal social media accounts as a condition of hiring and employment.

Maryland's law, for instance, was passed after a controversial incident where a sate Division of Corrections worker was asked to provide his Facebook login credentials during a recertification interview.

Similarly, Michigan's law came after an elementary school teacher's aide was fired for refusing to provide school authorities access to her Facebook profile. The request came after a parent complained about seeing what they called an inappropriate photo on the social media site.

In a report issued last year, the Council of State Governments said it had received several reports of people being asked to delete their social media accounts, 'friend' the human resources director and/or supply private login credentials to employers.

The new Illinois law explicitly bans such employer requests, even for jobs that require comprehensive background screening.

The law does, however, allow employers to review publicly available social media information and to monitor employee email and data stored on company computers.

Copyright 2018 IDG Communications. ABN 14 001 592 650. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of IDG Communications is prohibited.