Apple ID required when opening an app
My iPhone keeps asking me for my Apple ID and password when i open an app that i hadn't used for a while. This occurs randomly; it happens even on apps that i have been using just five minutes ago, and whenever I put in the correct password the app crashes and would go back to the home screen. When i try to open it again, it keeps crashing and goes back to the home screen. To fix this i need to turn off the phone completely and i do not know why this keeps happening.
iPhone 7