Michael D. Coogan, The Old Testament: A Historical and Literary Introduction to the Hebrew Scriptures, third edition (OUP, 2014), 49-50.
In the Middle Ages, a few Jewish and Christian scholars recognized that problems existed with the notion of Moses’ authorship. Thus, for example, some argued that since the last few verses of the last book of the Torah describe Moses’s death and burial (Deut 34.5-12), it was unlikely that he had written those verses himself; rather, their author was probably Joshua, Moses’s divinely designated successor. Others countered, however, that since Moses was a prophet (Deut 34.10), he could have foreseen, by divine revelation, what would happen at the end of his life. But despite this and a few similarly minor items, however, the belief that Moses wrote the Pentateuch remained unchallenged until the seventeenth century.