I modified the Glasses Holder model by Boogie to remove the mounts for screws and add a spot to put magnets flush on the backside.
After printing the model use glue to mount the magnets in place. I've found that only 2 magnets are truly needed to get a good grip but more can be added if needed.
Magnets (10x3): Amazon Link
The author remixed this model.