Skip to content

MyLinkPi/login

Repository files navigation

login

description

get ad\token\device_id in file: .login

dependency

npm pnpm i

usage

node login.js

or

npm run login

logout:

npm run logout

or delete .login file

用函数调用

const login = require('./login')
console.log('start')
const f = await login.asyncLogin();
if (!f) {
    console.log('login failed')
    return
}
if (f) {
    console.log('login success')
}
const {ad, token, device_id} = await login.adToken();
console.log(ad, token, device_id)
{
    await login.logout()
    let {ad, token, device_id} = await login.adToken();
    console.log(ad, token, device_id)
}

调用时传参定义用户环境

const login = require('./login')
console.log('start')
const f = await login.asyncLogin('https://test.***.com');
if (!f) {
    console.log('login failed')
    return
}

About

get login ad token in ./login file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published