跳到主要内容

bn.ensureLoggedIn

ensureLoggedIn(): Promise<EnsureLoggedInResponse>

description Ensure user has logged in, if not, show login dialog. Return user log in result

example

 const { alreadyLogged, logged, abort } = await bn.ensureLoggedIn()

Returns

Promise<EnsureLoggedInResponse>

Interface: EnsureLoggedInResponse

NameTypeDescription
abortbooleanUser aborts logging in
alreadyLoggedbooleanalready logged
loggedbooleanIf the user logged out before calling ensureLogged(), and has logged in successfully, then this property should be true.