authgear-server icon indicating copy to clipboard operation
authgear-server copied to clipboard

[AuthUI] Keyboard is not shown automatically on OTP page

Open linear[bot] opened this issue 10 months ago • 7 comments

Environment:

  • Environment: Staging
  • Project: qa-ui-vtwo
  • Demo app: iOS Authgear Demo Capacitor
  • Device: iPhone 15 (iOS 17.4.1)

Description:

When the user clicks the login button and enters their email, they are taken to the OTP entry page. However, the keyboard does not show automatically on this page. The same case also happens on other OTP code entry page.

Steps to reproduce:

  1. Open and Configure the Demo App
  2. Click "Authenticate" to start
  3. Click the "Login" button
  4. Enter your email address
  5. See enter OTP page, but the kwyboard does not show up automatically

Expected behaviour:

The keyboard should show automatically when the user enters the OTP entry page.

Screenshot

IMG_2143.PNG

linear[bot] avatar Apr 10 '24 07:04 linear[bot]

@tung2744, I rmb it's not possible in ASWebAuthentication for the keyboard to show automatically? and it also requires some hack workaround for webview..

fungc-io avatar Apr 10 '24 16:04 fungc-io

I think it is possible to show automatically. The problem is it could block the error message. The behavior now should be when there is error, the field will not be auto focused. (But seems not related to this issue)

tung2744 avatar Apr 11 '24 08:04 tung2744

oh!? :shock-coffee: Let's make the Keyboard auto show then

fungc-io avatar Apr 11 '24 09:04 fungc-io

I remember we should have done it. So it may be a bug.

tung2744 avatar Apr 12 '24 04:04 tung2744

  1. It seems the autofocus attribute is already set.
  2. When inspecting the webview, the input is focused. But keyboard was not showing.

https://bugs.webkit.org/show_bug.cgi?id=195884#c4

Looks like safari don't allow showing keyboard with programatic focus.

tung2744 avatar May 07 '24 06:05 tung2744

Yes, i rmb it's impossible in ASWebAuthentication.

fungc-io avatar May 07 '24 08:05 fungc-io