Compare commits
No commits in common. "v0.2.0-develop.8" and "v0.2.0-develop.7" have entirely different histories.
v0.2.0-dev
...
v0.2.0-dev
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libportal",
|
||||
"version": "0.2.0-develop.8",
|
||||
"version": "0.2.0-develop.7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libportal",
|
||||
"version": "0.2.0-develop.8",
|
||||
"version": "0.2.0-develop.7",
|
||||
"dependencies": {
|
||||
"@noble/curves": "^1.1.0",
|
||||
"@noble/hashes": "^1.3.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libportal",
|
||||
"version": "0.2.0-develop.8",
|
||||
"version": "0.2.0-develop.7",
|
||||
"main": "lib/index.js",
|
||||
"module": "lib/index.mjs",
|
||||
"types": "lib/index.d.ts",
|
||||
|
|
|
@ -105,10 +105,6 @@ export class Client {
|
|||
}
|
||||
|
||||
async login(): Promise<LoginResponse> {
|
||||
if (!this._options.privateKey) {
|
||||
return this.loginPubkey();
|
||||
}
|
||||
|
||||
return this.post<LoginResponse>("/api/v1/auth/login", {
|
||||
email: this._options.email,
|
||||
password: this._options.password,
|
||||
|
@ -135,7 +131,7 @@ export class Client {
|
|||
return json.status as boolean;
|
||||
}
|
||||
|
||||
async loginPubkey(): Promise<LoginResponse> {
|
||||
async loginPubkey(): Promise<void> {
|
||||
if (!this._options.privateKey) {
|
||||
throw new Error("Private key is required");
|
||||
}
|
||||
|
@ -162,8 +158,6 @@ export class Client {
|
|||
);
|
||||
|
||||
this.jwtSessionKey = loginRet.token;
|
||||
|
||||
return { token: loginRet.token };
|
||||
}
|
||||
|
||||
logout(request: LogoutRequest): Promise<void> {
|
||||
|
|
Loading…
Reference in New Issue