Compare commits
No commits in common. "v0.2.0-develop.9" and "v0.2.0-develop.8" have entirely different histories.
v0.2.0-dev
...
v0.2.0-dev
|
@ -1,10 +1,3 @@
|
|||
# [0.2.0-develop.9](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.8...v0.2.0-develop.9) (2023-06-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* refactor initPortal to return the instance ([89d2439](https://git.lumeweb.com/LumeWeb/libweb/commit/89d24393e5ec8c3d0846b00bec2912dd177e34a8))
|
||||
|
||||
# [0.2.0-develop.8](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.7...v0.2.0-develop.8) (2023-06-23)
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.9",
|
||||
"version": "0.2.0-develop.8",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.9",
|
||||
"version": "0.2.0-develop.8",
|
||||
"dependencies": {
|
||||
"@lumeweb/libportal": "0.2.0-develop.5",
|
||||
"@noble/curves": "^1.1.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.9",
|
||||
"version": "0.2.0-develop.8",
|
||||
"main": "lib/index.js",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
|
|
|
@ -20,7 +20,7 @@ export function maybeInitDefaultPortals(): ErrTuple {
|
|||
}
|
||||
|
||||
for (const portal of DEFAULT_PORTAL_LIST) {
|
||||
addActivePortal(initPortal(portal));
|
||||
initPortal(portal);
|
||||
}
|
||||
|
||||
return [null, null];
|
||||
|
@ -58,7 +58,7 @@ export function addActivePortal(portal: Client) {
|
|||
ACTIVE_PORTALS.add(portal);
|
||||
}
|
||||
|
||||
export function initPortal(portal: Portal): Client {
|
||||
export function initPortal(portal: Portal) {
|
||||
const sessions = getPortalSessions();
|
||||
let jwt: string | null = null;
|
||||
if (sessions) {
|
||||
|
@ -67,12 +67,14 @@ export function initPortal(portal: Portal): Client {
|
|||
}
|
||||
}
|
||||
|
||||
return new Client({
|
||||
const client = new Client({
|
||||
email: generatePortalEmail(portal),
|
||||
portalUrl: portal.url,
|
||||
privateKey: generatePortalKeyPair(portal).privateKey,
|
||||
jwt: jwt as string,
|
||||
});
|
||||
|
||||
addActivePortal(client);
|
||||
}
|
||||
|
||||
export function getPortalSessions() {
|
||||
|
|
Loading…
Reference in New Issue