As an important topic of IoT, wireless sensor network (WSN) data transmission is popular nowadays. It is widely accepted that the wireless channel is hazard, and multifactor authentication schemes are proposed to save the hazard of wireless communication circumstance. To overcome the problems, we give a fresh three-factor authentication scheme providing session keys for WSNs. Formal verification given by Proverif illustrates that the new scheme keeps security properties. At the same time, the informal analysis also denotes that the proposed scheme is practical and satisfies general needs, such as counteraction against various attacks and meeting security properties. Compared to some recent similar schemes, the proposed scheme performs better in security and is suitable for application.