Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to enable auto-fill for 2 page login ? #3

Open
skadambala opened this issue Jul 24, 2019 · 9 comments
Open

How to enable auto-fill for 2 page login ? #3

skadambala opened this issue Jul 24, 2019 · 9 comments

Comments

@skadambala
Copy link

Hi @vineetchoudhary

Thanks for putting up this article. It's very elaborative and easy to understand.
I gave a try using your source. Auto fill password is working fine.

I have question for you.
Does auto fill password support on 2 page login ? First screen having username textfield and second screen having password textfield. I have tried but no luck. Do you have any inputs for me to make it work on 2 page login ?

Thanks,
Swathi

@vineetchoudhary
Copy link
Member

Hi,

I think it is possible but I'm not sure. You can try it by putting a hidden username textfield on 2nd page. Where username will be prefilled which you can do just passing the username from 1st page. Also, don't forget to set textContentType for both field.

Let me know if it's work. 😃

@skadambala
Copy link
Author

Yeah, that's what I have thought of doing so if there is no straight forward way of doing it. Before going with that approach, I wanted to know from you if you have done some thing like that.

@vineetchoudhary
Copy link
Member

There is no official documentation for this case. So, go ahead with above approach and let me know about the final result. 😛

@skadambala
Copy link
Author

skadambala commented Jul 24, 2019

iOS displays 'Do you want to save password' dialog only when user selects input fields (set with right content types). In my case, as second field is hidden, I tried first bysimulating fake tap on hidden text field and even with making hidden textfield as first responder, and also tried by firing some events on textfield. None of these are working :(

@skadambala
Copy link
Author

I came across this. https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_a_text_input_view

Did u see this "Explicitly defining a view’s text content type improves the performance of Password AutoFill’s heuristics and lets you support login workflows that couldn’t otherwise be detected by these heuristics. For example, the heuristics assume the user name and password inputs are on the same page. If you have a multipage login form, explicitly setting the .username and .password types lets the user tap and fill those inputs, even if they are on separate pages"

I am going to change textfields to textviews and try it out.

@vineetchoudhary
Copy link
Member

iOS displays 'Do you want to save password' dialog only when user selects input fields (set with right content types). In my case, as second field is hidden, I tried first bysimulating fake tap on hidden text field and even with making hidden textfield as first responder, and also tried by firing some events on textfield. None of these are working :(

As you say the second text field is hidden. I think you should try by putting the username field first (before the password field).

@mahesh-rideziro
Copy link

This above solution for the auto-fill password doesn't work for me. Does any other way to achieve it?

@mahesh-rideziro
Copy link

If you have a multipage login form, explicitly setting the .username and .password types lets the user tap and fill those inputs, even if they are on separate pages.

How to implement this for autofill password for multipage login form?

@SyamalaHari
Copy link

Hi any one could get autofill for multipage login. I tried hiding username textfield but no luck.I don't understand the statement in Apple documentation

"Explicitly defining a view’s text content type improves the performance of Password AutoFill’s heuristics and lets you support login workflows that couldn’t otherwise be detected by these heuristics. For example, the heuristics assume the user name and password inputs are on the same page. If you have a multipage login form, explicitly setting the .username and .password types lets the user tap and fill those inputs, even if they are on separate pages"

I have set them but no luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants