Compare commits

..

No commits in common. "v0.2.0-develop.8" and "v0.2.0-develop.7" have entirely different histories.

3 changed files with 4 additions and 10 deletions

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@lumeweb/libportal", "name": "@lumeweb/libportal",
"version": "0.2.0-develop.8", "version": "0.2.0-develop.7",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lumeweb/libportal", "name": "@lumeweb/libportal",
"version": "0.2.0-develop.8", "version": "0.2.0-develop.7",
"dependencies": { "dependencies": {
"@noble/curves": "^1.1.0", "@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1", "@noble/hashes": "^1.3.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@lumeweb/libportal", "name": "@lumeweb/libportal",
"version": "0.2.0-develop.8", "version": "0.2.0-develop.7",
"main": "lib/index.js", "main": "lib/index.js",
"module": "lib/index.mjs", "module": "lib/index.mjs",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

View File

@ -105,10 +105,6 @@ export class Client {
} }
async login(): Promise<LoginResponse> { async login(): Promise<LoginResponse> {
if (!this._options.privateKey) {
return this.loginPubkey();
}
return this.post<LoginResponse>("/api/v1/auth/login", { return this.post<LoginResponse>("/api/v1/auth/login", {
email: this._options.email, email: this._options.email,
password: this._options.password, password: this._options.password,
@ -135,7 +131,7 @@ export class Client {
return json.status as boolean; return json.status as boolean;
} }
async loginPubkey(): Promise<LoginResponse> { async loginPubkey(): Promise<void> {
if (!this._options.privateKey) { if (!this._options.privateKey) {
throw new Error("Private key is required"); throw new Error("Private key is required");
} }
@ -162,8 +158,6 @@ export class Client {
); );
this.jwtSessionKey = loginRet.token; this.jwtSessionKey = loginRet.token;
return { token: loginRet.token };
} }
logout(request: LogoutRequest): Promise<void> { logout(request: LogoutRequest): Promise<void> {