It’s very irritating to apply a stain to a project only to find there’s glue on the surface that prevents penetration. Areas with glue show up lighter.
There are two easy methods of checking for glue so you can remove it: wet the wood with water; or wet the wood with a thinner such as mineral spirits (paint thinner).
Water will turn the glue white, as shown in the picture. The area will be lighter under mineral spirits, similar to the way it looks under a stain.
The problem with using water is that it raises the grain of the wood, so you will have to sand to level the grain. Mineral spirits won’t raise the grain, but it may interfere with the flow out of a water-based finish if you don’t let the mineral spirits dry totally before finishing.