As I understand it viewfinders are designed to function as if the image viewed through them is a set, fixed distance from the viewer's eye. In the case of the Leica M series I think this is around 1 metre (+ - ) someone please correct me if I am wrong it has been a while since I have looked into this. I do however know that the same M viewfinder is built with a -0.5 diopter (which may be the same thing as above - I am not up on this stuff relating to diopters). The bottom line though is that in the case of this example given that the Leica M viewfinder is preset by default to -0.5 diopters, anyone wearing glasses of +1 diopter strength would require a +1.5 diopters correction lens for a clear view. Other cameras will have something more or less similar. In other words to compensate for the inbuilt slightly negative diopter of the Leica finder your correction lens (eyeglasses or screw in diopter adjustment lens) would need to take account of this. (In other words, your normal prescribed eyeglasses are unlikely to be precisely correct when looking through an M viewfinder due it having an inbuilt -0.5 diopter)
I did research this in a bit of depth a number of years ago when I was looking for a good way to correct the eyepiece on my camera, which happened to be a Leica M. In the end I decided the easiest way might be to go to a chemist store (drugstore I suppose if you are in USA) and go to one of those stands where they have cheap reading glasses, each with different diopter lenses. Try them on one after the other, and with your preferred viewing eye try to focus through your camera's viewfinder. When you have a sharp image using one of these reading glasses that is the diopter correction you will need for that camera using that eye. (Bearing in mind you may not get something precisely correct off the shelf but it should be better than nothing and at worst it will help you have the conversation about your approximate eyeglass needs with your optician / optometrist.) Note I never actually tried to use those reading glasses as my means of correcting my eyesight when using the camera - I used it simply to inform me as to which screw in Leica M diopter lens to buy. I always thought that the exit pupil of the Leica M finder did not conveniently work for me or allow me to get my eye close enough to the finder when wearing specs. Though I know some people are happy to use specs when actually shooting this usually ends up with scratched lenses. You will sometimes see threads about how to prevent this by gluing some kind of soft buffer onto the rim of the viewfinder.
The above worked for me for a number of years but my eyes got progressively worse requiring changes to diopters needed and in the end I just found it easier to buy a eyepiece magnifier with an inbuilt adjustable diopter that allowed me to adjust the diopter each time my eyes changed. But there is no reason why I could not have just stuck with the idea I mentioned above.
The eyepiece I bought was from Japan Exposures and while these are primarily sold as eyepiece magnifiers they have that inbuilt adjustable diopter capability. Be aware that stronger magnification versions will limit your ability to see the very outer frame-lines if you are prone to using wide angle lenses though they are of course very helpful in focusing longer lenses where that issue does not arise in any event.
Magnification options include, either:
(While the page says this is sold out, another page says it is now back in stock again or perhaps will be soon as they are making more of them in order to restock).