Did Satan actually have the authority to give Jesus the kingdoms of the world?

Yes, the kingdoms were Satan's to give at that time, but Jesus will obtain them legitimately through His second coming as King of Kings rather than by worshiping Satan.

Watch the Teaching: Who Sits in the Temple and Claims to Be God?