Log out user or closing the app. How?

I am using Ionic -v 5.1.0 to build an app - it’s going quite ell for my first go… however, I cannot for the life of me find how to close the app. I could redirect to the login page with no user id being carried in the url, for example, but a clean clise would be better, no?

For ionic 3, you can exit app by this.platform.exitApp(); for android.
You can’t exit app in iOS (disallowed by apple).