From d798d31cd6ed574c845aa0fe8b38ae31e7deee4f Mon Sep 17 00:00:00 2001 From: Perki Date: Fri, 31 Jan 2025 14:01:22 +0100 Subject: [PATCH 1/7] Added customization of publicUrls --- components/api-server/config/public-url.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/api-server/config/public-url.js b/components/api-server/config/public-url.js index 151fa4e..299c0cc 100644 --- a/components/api-server/config/public-url.js +++ b/components/api-server/config/public-url.js @@ -40,7 +40,8 @@ const WWW_PATH = '/www'; async function publicUrlToService (config) { const isDnsLess = config.get('dnsLess:isActive'); const publicUrl = config.get('dnsLess:publicUrl'); - if (isDnsLess && publicUrl != null) { + const customPublicUrl = !!config.get('service:publicUrl'); + if (customPublicUrl && isDnsLess && publicUrl != null) { config.set('service', { api: buildUrl(publicUrl, '/{username}/'), register: buildUrl(publicUrl, path.join(REG_PATH, '/')), From 9bd55d9cf6f4d8bb68cc75ecb426e56ede80b387 Mon Sep 17 00:00:00 2001 From: Perki Date: Fri, 31 Jan 2025 14:04:48 +0100 Subject: [PATCH 2/7] better placement of setting --- components/api-server/config/public-url.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/api-server/config/public-url.js b/components/api-server/config/public-url.js index 299c0cc..56f3454 100644 --- a/components/api-server/config/public-url.js +++ b/components/api-server/config/public-url.js @@ -40,7 +40,7 @@ const WWW_PATH = '/www'; async function publicUrlToService (config) { const isDnsLess = config.get('dnsLess:isActive'); const publicUrl = config.get('dnsLess:publicUrl'); - const customPublicUrl = !!config.get('service:publicUrl'); + const customPublicUrl = !!config.get('dnsLess:customPublicUrl'); if (customPublicUrl && isDnsLess && publicUrl != null) { config.set('service', { api: buildUrl(publicUrl, '/{username}/'), From e63dca857b8cb226aa15a7092559b8fbf9c19dfc Mon Sep 17 00:00:00 2001 From: Perki Date: Fri, 31 Jan 2025 14:06:32 +0100 Subject: [PATCH 3/7] fix --- components/api-server/config/public-url.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/api-server/config/public-url.js b/components/api-server/config/public-url.js index 56f3454..8488376 100644 --- a/components/api-server/config/public-url.js +++ b/components/api-server/config/public-url.js @@ -1,6 +1,6 @@ /** * @license - * Copyright (C) 2020–2024 Pryv S.A. https://pryv.com + * Copyright (C) 2020–2025 Pryv S.A. https://pryv.com * * This file is part of Open-Pryv.io and released under BSD-Clause-3 License * @@ -40,7 +40,7 @@ const WWW_PATH = '/www'; async function publicUrlToService (config) { const isDnsLess = config.get('dnsLess:isActive'); const publicUrl = config.get('dnsLess:publicUrl'); - const customPublicUrl = !!config.get('dnsLess:customPublicUrl'); + const customPublicUrl = !config.get('dnsLess:customPublicUrl'); if (customPublicUrl && isDnsLess && publicUrl != null) { config.set('service', { api: buildUrl(publicUrl, '/{username}/'), From 305e563f94b745426a61d774d8457e65aeaeab54 Mon Sep 17 00:00:00 2001 From: Perki Date: Fri, 31 Jan 2025 14:57:31 +0100 Subject: [PATCH 4/7] Hosting --- components/register/src/business/dataservers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/register/src/business/dataservers.js b/components/register/src/business/dataservers.js index e8ce70d..497b783 100644 --- a/components/register/src/business/dataservers.js +++ b/components/register/src/business/dataservers.js @@ -45,8 +45,8 @@ function getHostings() { hostings: { hosting1: { url: home, - name: 'Pryv.io', - description: 'Self hosted', + name: 'Switzerland', + description: 'Infomaniak', available: true, availableCore: publicUrl } From 11f402459dd287e4bc7ba8400c557bb5745729d8 Mon Sep 17 00:00:00 2001 From: Perki Date: Tue, 11 Feb 2025 09:23:01 +0100 Subject: [PATCH 5/7] Updating mail launch command --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fe87ddc..c1ad746 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "api": "LOGS=info NODE_ENV=production ./components/api-server/bin/server --config ./configs/api.yml", "apibackloop": "LOGS=info NODE_ENV=production ./components/api-server/bin/server --config ./configs/api-backloop.yml", "database": "DEVELOPMENT=true scripts/start-mongo", - "mail": "cd service-mail ; ./bin/server", + "mail": "cd service-mail ; ./bin/server --config=../configs/mail-config.yml", "pryv": "npm run database >> ./var-pryv/logs/mongodb.log & npm run mail >> ./var-pryv/logs/mail.log & npm run api", "setup-dev-env": "scripts/setup-dev-env", "test": "echo 'This project doesn’t use npm scripts – enter `just` for the available development commands\n' && exit 1" From 4de1424f4b9012600f7fe3a76812a0b0a10825bb Mon Sep 17 00:00:00 2001 From: Perki Date: Tue, 11 Feb 2025 09:34:56 +0100 Subject: [PATCH 6/7] Changing mail templates to HDS --- service-mail/templates/reset-password/en/html.pug | 4 ++-- service-mail/templates/reset-password/fr/html.pug | 4 ++-- service-mail/templates/reset-password/fr/subject.pug | 2 +- service-mail/templates/welcome-email/en/html.pug | 4 ++-- service-mail/templates/welcome-email/en/subject.pug | 2 +- service-mail/templates/welcome-email/fr/html.pug | 4 ++-- service-mail/templates/welcome-email/fr/subject.pug | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/service-mail/templates/reset-password/en/html.pug b/service-mail/templates/reset-password/en/html.pug index 83384b5..b170590 100644 --- a/service-mail/templates/reset-password/en/html.pug +++ b/service-mail/templates/reset-password/en/html.pug @@ -1,4 +1,4 @@ p Hi, p We have received word that you have lost your password. If you have asked for a password request please click on the link below. If you did not please delete this email. -p Click here to reset your Pryv password. -p Pryv team \ No newline at end of file +p Click here to reset your HDS password. +p HDS team \ No newline at end of file diff --git a/service-mail/templates/reset-password/fr/html.pug b/service-mail/templates/reset-password/fr/html.pug index 06137c9..a3d28b2 100644 --- a/service-mail/templates/reset-password/fr/html.pug +++ b/service-mail/templates/reset-password/fr/html.pug @@ -1,4 +1,4 @@ p Bonjour, -p Il paraît que vous avez oublié votre mot de passe Pryv. Si vous avez bien demandé la réinitialisation de votre mot de passe, merci de cliquer sur le lien ci-dessous. Si ce n'était pas vous, merci de supprimer cet email. +p Il paraît que vous avez oublié votre mot de passe HDS. Si vous avez bien demandé la réinitialisation de votre mot de passe, merci de cliquer sur le lien ci-dessous. Si ce n'était pas vous, merci de supprimer cet email. p Cliquez içi pour réinitialiser votre mot de passe. -p L'équipe Pryv +p L'équipe HDS diff --git a/service-mail/templates/reset-password/fr/subject.pug b/service-mail/templates/reset-password/fr/subject.pug index 0b6160b..3f58fb2 100644 --- a/service-mail/templates/reset-password/fr/subject.pug +++ b/service-mail/templates/reset-password/fr/subject.pug @@ -1 +1 @@ -= `Bienvenue sur Pryv` += `Bienvenue sur Health Data Safe` diff --git a/service-mail/templates/welcome-email/en/html.pug b/service-mail/templates/welcome-email/en/html.pug index 46e8fd4..abbdfb5 100644 --- a/service-mail/templates/welcome-email/en/html.pug +++ b/service-mail/templates/welcome-email/en/html.pug @@ -1,8 +1,8 @@

Hey #{USERNAME},

-

Thanks for creating your Open Pryv.io account

+

Thanks for creating your Health Data Safe account

-

We have built Pryv.io so you could have a private and secure place to collect and unite your personal digital life. Connect apps and devices, get insight and share selectively.

+

We have built HDS so you could have a private and secure place to collect and unite your personal digital life. Connect apps and devices, get insight and share selectively.

Information you entrusted us with:
Email: #{EMAIL}
diff --git a/service-mail/templates/welcome-email/en/subject.pug b/service-mail/templates/welcome-email/en/subject.pug index 1db63ea..06aaaa1 100644 --- a/service-mail/templates/welcome-email/en/subject.pug +++ b/service-mail/templates/welcome-email/en/subject.pug @@ -1 +1 @@ -= `Welcome to Open Pryv` += `Welcome to Health Data Safe` diff --git a/service-mail/templates/welcome-email/fr/html.pug b/service-mail/templates/welcome-email/fr/html.pug index 8d9429e..aa5424b 100644 --- a/service-mail/templates/welcome-email/fr/html.pug +++ b/service-mail/templates/welcome-email/fr/html.pug @@ -1,8 +1,8 @@

Bonjour #{USERNAME},

-

Merci pour la création de votre compte Open Pryv.io

+

Merci pour la création de votre compte Health Data Safe

-

Nous avons développé Pryv.io pour vous fournir une place pour collecter et unifier vos données de vies, tout en respectant votre sécurité et votre vie privée. Connectez vos applications et appareils, gérez et partagez en toute conscience.

+

Nous avons développé HDS pour vous fournir une place pour collecter et unifier vos données de vies, tout en respectant votre sécurité et votre vie privée. Connectez vos applications et appareils, gérez et partagez en toute conscience.

Informations que vous nous avez confiées:
Email: #{EMAIL}
diff --git a/service-mail/templates/welcome-email/fr/subject.pug b/service-mail/templates/welcome-email/fr/subject.pug index a07cb14..b6c6f8c 100644 --- a/service-mail/templates/welcome-email/fr/subject.pug +++ b/service-mail/templates/welcome-email/fr/subject.pug @@ -1 +1 @@ -= `Bienvenue sur Open Pryv` += `Bienvenue sur HDS` From d35831af303b7aff011684f7b0c83e0ebbcce885 Mon Sep 17 00:00:00 2001 From: Perki Date: Thu, 24 Apr 2025 15:22:44 +0200 Subject: [PATCH 7/7] Simple customization to use home made app-web-auth3 --- components/register/src/config.js | 7 +++---- configs/api.yml | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/register/src/config.js b/components/register/src/config.js index 7255f1f..4362e41 100644 --- a/components/register/src/config.js +++ b/components/register/src/config.js @@ -52,12 +52,11 @@ module.exports = { if (settingPublicUrl.slice(-1) !== '/') { settingPublicUrl += '/'; } - const pathPublicUrl = settingPublicUrl.slice(0, -1); + // const pathPublicUrl = settingPublicUrl.slice(0, -1); config.publicUrl = settingPublicUrl; config['access:trustedAuthUrls'] = [settingPublicUrl]; - config['access:defaultAuthUrl'] = [ - pathPublicUrl + wwwPath + '/access/access.html' - ]; + config['access:defaultAuthUrl'] = [settings.get('hds:defaultAuthUrl')]; + // pathPublicUrl + wwwPath + '/access/access.html' ]; // load admin keys config.adminKey = settings.get('auth:adminAccessKey'); diff --git a/configs/api.yml b/configs/api.yml index 14be9d1..9174892 100644 --- a/configs/api.yml +++ b/configs/api.yml @@ -1,3 +1,5 @@ +hds: + defaultAuthUrl: https://healthdatasafe.github.io/app-web-auth3-hds/access/access.html dnsLess: publicUrl: http://localhost:3000/ # the "Public" URL to reach the service, you need to change this if you use a third party SSL service such as NGNIX. http: