2

i am new in nw.js and currently i am developing and sample app in nw.js. I downloaded nw.js 64bit and create an small login page and its working perfect. But when i login once it saves my login details and never removes even i restart my app many times but my details are still there.

can any one tell me how i can prevent nw.js chromium to save my login details.

enter image description here

MyCode:

<form method="POST" action="example.html" id="loginNow" autocomplete="nope">
<div class="login-card" style="margin-top: 10%;">
<h1>Log-in</h1><br>
<select name="usertype" style="width:100%; font-size: 13px; min-height: 30px; margin-bottom:3.5%;">
  <option>Select User Type</option>
  <option value="rps">RPS</option>
  <option value="gd">Godown</option>
</select>
<input type="text" name="username" placeholder="Username" id="username" value="" autocomplete="nope">
<input type="password" name="password" placeholder="Password" id="password" value="" autocomplete="nope">

<input type="submit" name="login" class="login login-submit" value="login" id="loginBut">

<div class="login-help">
 <a href="#">Forgot Password</a>
 <a href="javascript:;" target="_blank" id="wind">Switch To Online</a>
</div>

Rahul Sharma
  • 622
  • 7
  • 25

2 Answers2

2

This has been driving me crazy. Apparently Chromium ignores autocomplete="off" now.

The correct way to do this is to set autocomplete="new-password" on the password input, as seen here.

Community
  • 1
  • 1
Skylar Ittner
  • 802
  • 11
  • 26
0

Try this setting in your package.json:

"chromium-args": "--disable-password-generation",

Usr29
  • 41
  • 1
  • In that case a node.js function that clears all contents of C:\Users\USER-NAME\AppData\Local\APP-NAME on program exit, should do the trick. – Usr29 Oct 06 '16 at 10:29
  • Wow...nice..i just change temp path by `--user-data-dir='temp/'` and clean it every time on app close..thanks..you can post this on answer... – Rahul Sharma Oct 06 '16 at 12:42