In January 2017, senior Trump aide Rob Porter approached White House Counsel Don McGahn to inform him that his security clearance background check might return derogatory information, CBS News has learned. The White House staff secretary was not specific about what the information was -- Porter said only that his ex-wives were likely going to say unflattering things about him to investigators.

McGahn told Porter to rest assured there was a process in place for the background check, and he should let the FBI process play out. In the meantime -- which extended to this week -- Porter would work under an interim security clearance.

In June 2017, Porter's preliminary file was sent from the FBI to the White House security office. It contained information from his ex-wives alleging abuse. The file never went to McGahn personally, but it may have gone to another attorney in the White House counsel's office. There are 400 people who work in the White House security office. The FBI develops a background file on a political appointee that contains interviews, "302" forms, as well as any more documentation they gather. It falls to the security office to review that file and make a recommendation. Porter was working on a temporary clearance because the security office delayed its recommendation, once the derogatory information in his file became known.

A few months later, in September 2017, Porter informed McGahn that he had been interviewed by the FBI for a second time.

Get Breaking News Delivered to Your Inbox

Then, in November 2017, McGahn received a call from an ex-girlfriend of Porter informing him of the abuse allegations made by both of Porter's ex-wives, Jennifer Willoughby and Colbie Holderness. A source told CBS News that this was the first time McGahn was told of the nature of the allegations.

It was soon clear that the issue was spousal abuse – both anger and physical violence -- but at that time, the level of detail from the girlfriend was short of what would later be revealed by the Daily Mail's reporting this week, according to a source.

McGahn then told White House chief of staff John Kelly that there was an issue pertaining to Porter's clearance, but he was vague about the allegations. He told Kelly that Porter's ex-wives were saying things about Porter that was denying.

Porter himself told Kelly that his ex-wives were saying false things about him.

On Wednesday, President Trump was taken aback by the news about Porter, and he spoke to him after he filed his resignation.

Now, Derek Lyons, deputy staff secretary, will be filling in as staff secretary until Porter is replaced, according to another source. Lyons is also a top candidate for the post.