You invest time into actually looking at applications properly and look at their previous work and ask them questions about that. The curious and learning mind will probably have some projects, because they are not only into the job for the money, but because they have a passion for the job. That's not a requirement, but it distinguishes the great ones from the mediocre ones.
That’s also something any number of people can fake easily. There’s a ton of smooth talkers who can hype up a project and talk in abstract about their previous projects but weren’t on the side of delivering it.
Show code and explain, or it didn't happen. Takes a capable interviewer, of course, to distinguish sweet talk from profound knowledge.
I’m confused by your response. You expect the candidates to show code from their current/previous employer ? Or side projects that most people aren’t allowed to do by employers?
No, not previous employer, of course (unless open source). I expect candidates to show code they worked on in their own projects. That is, if they have any. Having any not just forked and click deploy projects in itself is a signal, that is worth looking into.
If all their previous employers don't allow side projects (must be in US or something, where employees don't have rights), then they should pay accordingly more to balance that restriction and loss in experience.
Which employers don't allow side projects? Not every side project has to be a SaaS hustle with Stripe billing.
My employer definitely doesn't own all the code I write in the evenings and on the weekends on my own time. Does yours?