Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Latest commit

 

History

History
29 lines (19 loc) · 391 Bytes

File metadata and controls

29 lines (19 loc) · 391 Bytes
description
Logs out the currently authenticated Magic user

logout

Arguments

None.

Returns

PromiEvent<boolean>

Example

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!
}