That may work, but WD-40 is not really a lubricant, although most people use it for one. (it stands for Water Displacement formula number 40, which it was designed to displace water).
Kind of like Duct Tape works on everything but duct work. There are better lube out there, but I wouldn't use an aerosol one. Try something like the old 3-in-one oil, and let it slowly sink in while operating the door.
2012 Ford F250 ext. Cab 4x4
2002 Jeep Wrangler Sahara
2008 Yamaha V-Star 650 Classic
2008 Work and Play 18LT