GPS Sign in on app

How do yo make it so if you are in a building it will sign into an app?
Thanks in advance;)