Last active
January 29, 2018 04:23
-
-
Save MichaelScript/1ea27fe211fe55f278108816f0c8754a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Running this on https://google.com returns expected behavior: | |
# Chrome prompts you to save your credentials | |
# This also works if you spin up an http server i.e: `python -m SimpleHTTPServer` | |
# and run it in your console. | |
# However running on https://localhost results in a silent failure | |
# where the success function fires but you are not prompted. | |
# Easy way to spin up a simple https server is: https://gist.github.com/dergachev/7028596 | |
var creds = new PasswordCredential({ | |
id: "[email protected]", | |
password:"password1" | |
}); | |
navigator.credentials.store(creds).then(function(){ | |
console.log("Done saving credentials"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment