Recent

Author Topic: How to implement autofill of username and password  (Read 936 times)

Ten_Mile_Hike

  • Jr. Member
  • **
  • Posts: 87
How to implement autofill of username and password
« on: November 13, 2024, 04:24:21 pm »
Code: Text  [Select][+][-]
  1. Hello All,
  2.  
  3. NOTE: I don't care about security... this is as an academic exercise only.
  4.  
  5. After opening a URL in my browser (Firefox ) using either "Shellexecute" or  "OpenURL"
  6. is it possible to autofill the Username and Password fields?
  7.  
  8. TIA
  9. DBM

When any government, or any church for that matter, undertakes to say to its subjects, This you may not read, this you
must not see, this you are forbidden to know, the end result is tyranny and oppression no matter how holy the motives.

Robert A. Heinlein

Thaddy

  • Hero Member
  • *****
  • Posts: 16199
  • Censorship about opinions does not belong here.
Re: How to implement autofill of username and password
« Reply #1 on: November 13, 2024, 05:01:42 pm »
Yes. If you have access to a password vault. Otherwise your browser could not do that. Implementation depends.
But a better solution is to use certificates.( can be self signed) which is the academically optimal solution.
I use the latter solution for - some - of my own websites. I present a dialog if you do not have a certificate but If you even try a password you get dropped and logged....if you do not have the proper client certificate. /dev/null and more.
« Last Edit: November 13, 2024, 05:03:54 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

Ten_Mile_Hike

  • Jr. Member
  • **
  • Posts: 87
Re: How to implement autofill of username and password
« Reply #2 on: November 14, 2024, 12:55:27 am »
Thaddy,

Hello. Thank you for responding. To be clear the scenario that I had in mind was that I have my
personal UN/PW that had been stored locally and was accessible by my application already decrypted
and the Google.com login page is open in my browser and waiting for the UN/PW fields to be typed in.

Can I somehow, in that scenario, fill in the UN/PW fields via Pascal code without certificates? I know that
I could probably just copy them to the clipboard via code and past manually, but I was imagining
autofilling the fields similar to how "Lastpass" or "Protonpass" does it.

Thanks
When any government, or any church for that matter, undertakes to say to its subjects, This you may not read, this you
must not see, this you are forbidden to know, the end result is tyranny and oppression no matter how holy the motives.

Robert A. Heinlein

Fibonacci

  • Hero Member
  • *****
  • Posts: 614
  • Internal Error Hunter
Re: How to implement autofill of username and password
« Reply #3 on: November 14, 2024, 06:37:40 am »
Doable. Search forum, keywords: webdriver, chromedriver

egsuh

  • Hero Member
  • *****
  • Posts: 1493
Re: How to implement autofill of username and password
« Reply #4 on: November 15, 2024, 03:49:18 am »
Isn’t this an issue of browser itself? I think you can find a file that browser stores id/pw list, and it would be editable.

Zvoni

  • Hero Member
  • *****
  • Posts: 2754
Re: How to implement autofill of username and password
« Reply #5 on: November 15, 2024, 08:12:57 am »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Phoenix

  • Full Member
  • ***
  • Posts: 109
Re: How to implement autofill of username and password
« Reply #6 on: November 15, 2024, 11:33:30 am »
Doable. Search forum, keywords: webdriver, chromedriver

in fact there is something interesting about it in the forum even if I don't know how it achieves the goal you can see the link:
https://forum.lazarus.freepascal.org/index.php/topic,50082.0.html

 

TinyPortal © 2005-2018