The legitimation of the Beauforts, the children of John of Gaunt by Katherine Swynford, was initiated by Richard II in 1397 when he issued Letters Patent, subsequently read out by the Chancellor in Parliament, thus making it in effect an Act of Parliament. They had in 1396 been legitimated by the Pope but this could only spiritually legitimate them, it could not (necessarily) allow them to inherit lands or titles. This the Act of Richard II did, declaring them unconditionally able to ‘receive, hold, bear and exercise’ ‘any kind of honours, dignities, preeminences’ whatsoever. It did not mention any right to inherit the throne, which it may well be Richard assumed would be excluded anyway given the Beaufort’s origin.
It seems that Henry IV thought this because when John Beaufort, the eldest of the family, asked Henry in 1407 for an exemplification of the original Letters Patent they were issued in the same wording as before with the addition of the words ‘excepta dignitate regali’. This addition followed an interpolation written into the original Patent after the Chancellor had read it out in Parliament, but there is no doubt as to Henry IV’s intentions and that he did not regard his Beaufort cousins as in the line of succession. He had not gone beyond his own sons in 1406 when settling the crown on them all in succession after himself.
It thus seems that the Beauforts, and hence Henry Tudor, probably did in strict law have a right to inherit the throne. There remains a question though as to whether Richard II could give a right to the throne in the case of children born when both parents were married to other people and it seems probable that the general opinion in the fifteenth century would have been that the Beauforts were barred from the throne.
This question is discussed in many books, ‘The Beaufort Legitimation’ by M.H. Jackson-Lipkin, Coat of Arms, vol. 4, 1956-58, pp. 321-28 is the most detailed, and pp. 19-21, 23-24 of The King’s Mother, Lady Margaret Beaufort, Countess of Richmond and Derby by Michael K. Jones and Malcolm G. Underwood (1992) is also useful.