Eueno
  • EUENO – Decentralized Encrypting Blockchain Oracles for Web3
    • Litepaper
    • Use Cases
  • Get Started
    • Prerequisites
    • Buckets
      • Create a bucket
      • Delete a bucket
    • Files
      • Upload a file
      • View a file
      • Delete a file
      • Share a file
  • Pricing
  • Eueno libraries
    • @eueno/lib-browser
      • Installation
      • Setup
      • Create key (generate a key for encrypting the file(s))
      • login()
      • useEuenoContext()
      • getUserInfo()
      • updateUserInfo()
      • createProject()
      • getProjectInfo()
      • getProjects()
      • getFilesListByFolder()
      • deleteProject()
      • createFolder()
      • uploadFolder()
      • Get folder detail
      • deleteFolder()
      • uploadFile()
      • uploadFileWithSignedUrl()
      • getCid()
      • getFileById()
      • getFileListById()
      • Get file detail
        • getDetailFile()
        • getDetailUnencryptedFile()
        • getDetailEncryptedFile()
      • getDetailMultiEncryptedFiles()
      • deleteFile()
      • shareFile()
      • shareMultiFile()
      • deleteSharePermission()
      • getShareList()
      • getShareListToMe ()
    • @eueno/lib-node
      • Create eueno client
      • Create project key
      • Create project
      • Upload file
      • Upload folder
      • Get file
      • Get list file
      • Share file
      • Get shared files
      • Create folder
      • Create Account
      • Decrypt Get Key Aes
      • Decrypt File by Key Aes
  • Policies
    • Privacy Policy
    • Terms of Service
Powered by GitBook
On this page
  • Syntax
  • Parameters
  • Example
  1. Eueno libraries
  2. @eueno/lib-browser

login()

Syntax

login(account: string)

Login to eueno by Owallet account address. After login, the token will be saved in local storage with the name “eueno-token”. YOU MUST LOG IN BEFORE USING ANY METHOD IN EUENO LIBRARY.

Parameters

Name
Type
Required
Description

account

string

Yes

Owallet account address.

Example

import { login} from "@eueno/lib-browser";

const onLogin = async () => {
   try {
     const account = "0xf069fF728e9fc85D81163269F3b04Ef5CF387f15";
     const response = await login(account);
     console.log("LOGIN", response);
   } catch (error) {
     console.log(error);
   }
 };

Response of example:

 "data": {
        "account": "0xf069ff728e9fc85d81163269f3b04ef5cf387f15",
        "memo": "3506489706676224",
        "balance": 0,
        "token": "eyJhbG…8GMCQ",
        "create_at": "2022-12-26T03:16:26.903Z"
    }
PreviousCreate key (generate a key for encrypting the file(s))NextuseEuenoContext()

Last updated 2 years ago