Last active
April 14, 2020 05:14
-
-
Save wata/cd39f29876e4ae806967f634143439b3 to your computer and use it in GitHub Desktop.
A script to get the password from accounts.google.com for iOS shortcuts
This file contains 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
if (navigator.credentials && navigator.credentials.preventSilentAccess) { | |
navigator.credentials.get({ | |
password: true, | |
unmediated: false, | |
federated: { | |
providers: ['https://accounts.google.com'] | |
} | |
}).then((cred) => { | |
if (cred && cred.password) { | |
window.alert(cred.password) | |
} else { | |
window.alert('Not Found') | |
} | |
completion() | |
}).catch((error) => { | |
window.alert(error) | |
completion() | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2020-04-14:
NotSupportedError: Only PublicKeyCredential is supported