Username & Password

I have a project where I have two text fields for a user to enter a username and password. When the user clicks the submit button, I want the text they enter to auto inject into a username/password field on a website to log them in.

Any ideas how I can make this?

There's a bunch of ways, but the easiest and worst option is to attach the values as parameters in the url. I say 'worst' because you're sending them over plain HTTP and anyone can see them.

Why not just ask for the username, pass that to the website, and let the website request the password? Or, just have a button that goes to the website where both fields are requested?

Usually password and username / email information is stored in the keychain, which requires authentication before it can be accessed. If you have a Safari Extension with an app, you can share such credentials via local ways like native messaging and app groups (stored as encrypted of course) but generally this is not a good idea to store and auto-populate login information outside of the keychain. Also, please look into Authentication Services which can share stored info with other web processes on your device. It does require OAuth, but it is our supported authentication mechanism for use with web technology for login on iOS.

Rico
WWDR - DTS - Software Engineer

Username & Password
 
 
Q