Set Chrome Custom tab to invisible to user / resize it to very small

Viewed 333

I want to set the Chrome Custom Tab to be invisible to user, or at least resize to very small size. (Solution that only works for Chrome is OK).

The use case is as follows:

  1. We have an idp own by us, which can login to multiple websites and (in the future) Android applications
  2. When user launch our app, their first activity will be login through Chrome Custom Tab
    • So user can now browser our website, login to other apps and what not
  3. However, we want to logout the user whenever they close our app (for security reason)
  4. I am able to achieve the force logout by:
    1. capturing the close app event,
    2. open Chrome Custom Tab again,
    3. and redirect user back to the logout url of our idp, hence logging out the user
    4. Close the Chrome Custom Tab and the application entirely

Problem:

  • User now will see a full screen Chrome Custom Tab whenever they close our app, which is not ideal at all......
  • So if we can somehow make Chrome Custom Tab either be
    • Invisible, or
    • Shrink to very small
  • Then it will be perfect!

Thanks!

0 Answers
Related