Hide Google login dynamically - if user is in a webview

Is it possible to hide Google login (SSO) only if I detect that a user is in a webview ? (using navigator.userAgent for instance)
I know that we can allow or not social connection in the Auth0 dashboard of my application (dashboard > authentication > Social) but I would like to do it dynamically, depending on user agent I read once users arrive on the login page.
I’m using classic universal login.