Authorization flow
JWT Authentication
// Get JWT token for authentication
const wallet = wibe3.priorityWallet; // or any connected wallet
if (wallet) {
const jwt = await wallet.auth();
console.log("JWT token:", jwt);
// Use JWT for backend authentication
// Example: send to your backend API
await fetch("https://your-api.com/authenticate", {
method: "POST",
headers: {
Authorization: `Bearer ${jwt}`,
"Content-Type": "application/json",
},
});
}Last updated