I've recently had an interview where the interviewer scraped my most recent project off of GitHub, then asked me to add a feature, using a whiteboard. In my opinion this is the RIGHT WAY to do it.
The codebase is obviously familiar to the candidate, along with the problem domain. This rules out memorization, puzzle gaming, etc... It informs on programming style, ability to somewhat think on ones feet, but doesn't exclude candidates who didn't happen to guess what the interviewer wanted before the interview began.