description |
---|
Logs out the currently authenticated Magic user |
None.
import { Magic } from 'magic-sdk';
const m = new Magic('API_KEY');
try {
await m.user.logout();
console.log(await m.user.isLoggedIn()); // => `false`
} catch {
// Handle errors if required!
}