puter.ui.authenticateWithPuter()
Presents a dialog to the user to authenticate with their Puter account.
puter.ui.authenticateWithPuter()
None.
A Promise
that will resolve to true
. If the user cancels the dialog, the promise will be rejected with an error.
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
// Presents a dialog to the user to authenticate with their Puter account.
puter.ui.authenticateWithPuter().then((user)=>{
console.log(user)
});
</script>
</body>
</html>