That's pretty much the law everywhere in the U.S. (save perhaps Louisiana, which has a system rooted in Napoleonic law and not English common law). The mnemonic is ONCHA - open, notorious, continuous, hostile, and adverse.
> can you beat an adverse possession claim simply by giving the squatter permission?
I don't recall any cases off the top of my head. I doubt that an owner could unilaterally transform hostile possession into non-hostile possession; it'd be too tempting for the owner to try to fabricate backdated evidence of consent.
(Your question brought to mind a line from Henry Fielding, which my torts professor used to illustrate how consent is sometimes a defense: He in a few minutes ravished this fair creature, or at least would have ravished her, if she had not, by a timely compliance, prevented him. [3])
Even if he doesn't get the house he's still living rent free.
You can beat it with a peppercorn:
> [A] peppercorn rent is often used as a form of nominal ground rent where a (potentially substantial) premium has also been paid on commencement of a long lease of, say, 99 or 125 years (a "virtual freehold"). The notional collection of the annual peppercorn rent helps to maintain a formal Landlord and Tenant relationship between the two parties, precluding the risk of a claim for adverse possession from the tenant arising, were no consideration to be paid for an extended period.
http://en.wikipedia.org/wiki/Peppercorn_%28legal%29
(In this case, a 'peppercorn' is any tiny amount of money or other consideration, which is required to make a contract valid. It may, in fact, be a literal peppercorn.)
My question for you, as a lawyer who might know this: can you beat an adverse possession claim simply by giving the squatter permission? Would a written notice permitting occupation for, say, 60 days, reset the clock on "continuous hostile actual occupation"?