Compare commits
No commits in common. "v0.2.0-develop.31" and "v0.2.0-develop.30" have entirely different histories.
v0.2.0-dev
...
v0.2.0-dev
|
@ -1,10 +1,3 @@
|
||||||
# [0.2.0-develop.31](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.30...v0.2.0-develop.31) (2023-08-15)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* add loginActivePortals function ([a1b67e7](https://git.lumeweb.com/LumeWeb/libweb/commit/a1b67e71cd51003cae5f51ce927f6f9b6fa46ec6))
|
|
||||||
|
|
||||||
# [0.2.0-develop.30](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.29...v0.2.0-develop.30) (2023-08-10)
|
# [0.2.0-develop.30](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.29...v0.2.0-develop.30) (2023-08-10)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libweb",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.31",
|
"version": "0.2.0-develop.30",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/libweb",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.31",
|
"version": "0.2.0-develop.30",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
||||||
"@lumeweb/libportal": "0.2.0-develop.17",
|
"@lumeweb/libportal": "0.2.0-develop.17",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libweb",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.31",
|
"version": "0.2.0-develop.30",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { deriveChildKey } from "#keys.js";
|
||||||
import { ed25519 } from "@noble/curves/ed25519";
|
import { ed25519 } from "@noble/curves/ed25519";
|
||||||
import { bytesToHex } from "@noble/hashes/utils";
|
import { bytesToHex } from "@noble/hashes/utils";
|
||||||
import COMMUNITY_PORTAL_LIST from "@lumeweb/community-portals";
|
import COMMUNITY_PORTAL_LIST from "@lumeweb/community-portals";
|
||||||
import { NO_PORTALS_ERROR } from "#err.js";
|
|
||||||
|
|
||||||
let activePortalMasterKey;
|
let activePortalMasterKey;
|
||||||
|
|
||||||
|
@ -139,21 +138,3 @@ export function loadSavedPortals(): Portal[] | null {
|
||||||
|
|
||||||
return JSON.parse(portals);
|
return JSON.parse(portals);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function loginActivePortals() {
|
|
||||||
const activePortals = getActivePortals();
|
|
||||||
|
|
||||||
if (!activePortals.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const portal of activePortals) {
|
|
||||||
if (!(await portal.isLoggedIn())) {
|
|
||||||
try {
|
|
||||||
await portal.register();
|
|
||||||
} catch {}
|
|
||||||
|
|
||||||
await portal.login();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue