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

Latest commit

 

History

History
31 lines (19 loc) · 436 Bytes

File metadata and controls

31 lines (19 loc) · 436 Bytes
description
Checks if a user is currently logged in to the Magic Client-side SDK.

isLoggedIn

Arguments

None.

Returns

PromiEvent<Boolean>

Example

import { Magic } from 'magic-sdk';

const m = new Magic('API_KEY');

try {
  const isLoggedIn = await m.user.isLoggedIn();
  console.log(isLoggedIn) // => `true` or `false`
} catch {
  // Handle errors if required!
}