UNPKG

electron-auth0-login

Version:

Provides Auth0 authentication services for your Electron.js application

20 lines (19 loc) 652 B
import { Context } from '../types'; /** * Return a usable auth token or, failing that, try to get a new one * You should use this whenever you want to auth e.g. an API request */ export declare function getToken(ctx: Context): Promise<string>; /** * Check whether we are logged in */ export declare function isLoggedIn(ctx: Context): Promise<boolean>; /** * Manually start a login flow. * If you just want a token, use getToken(), which will log in only if we don't have a token available. */ export declare function login(ctx: Context): Promise<string>; /** * Log the user out */ export declare function logout(ctx: Context): Promise<void>;