-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ QRCode API #148
✨ QRCode API #148
Conversation
1b5fbd9
to
595a883
Compare
Hi @rezk2ll : which access_token do you display here ? Remember that an access token owns to only one device |
hi @rezk2ll , what kind of token in QR code? |
hi @rezk2ll , we want to generate QR code ourselves. Which endpoint we need to use? |
Hello @hoangdat , the endpoint is /_twake/v1/qrcode More details on the swagger docs here It requires the lemonldap cookie to be present in the request. The endpoint is available in staging |
it is an access_token obtained from matrix using the /_matrix/client/v3/login endpoint |
But we only need the token, we want to generate our QR code from our self, to put it to our component view |
The endpoint returns a ready SVG image that can be rendered freely on the front end. do you want an endpoint to return only a new access_token? like |
hi @guimard , what do you think it is security issue if access_token stay in QR code? |
Hi, there is a risk when QR code is displayed. |
commit 943a592 Author: Khaled Ferjani <kferjani@linagora.com> Date: Thu Dec 12 09:29:26 2024 +0100 🐛 fix monthly and weekly new users not being calculated correctly (#152) * 🐛 fix: monthly and weekly new users not being calculated correctly * 🧪 chore: fix tests * 🏷️ chore: fix types * 🧪 chore: fix controller unit test * 🧪 chore: fix tests * 🧪 chore: fix tests commit 4c8e9b9 Author: Khaled Ferjani <kferjani@linagora.com> Date: Wed Dec 11 14:12:15 2024 +0100 🐛 fix last_seen calculation is metrics API (#151) * 🎨 feat: added user_ips table to collection types * 🐛 fix: user last_seen field calculation * 🏷️ chore: added matrix user ip info type * 🧪 chore: fix tests commit 0c8a035 Author: Khaled Ferjani <kferjani@linagora.com> Date: Wed Dec 11 11:20:02 2024 +0100 🐛 fix(metrics API): remove unexistant fields in users table (#150) commit 7dce966 Author: Khaled Ferjani <kferjani@linagora.com> Date: Tue Dec 10 17:01:37 2024 +0100 ✨ Metrics API (#149) * ✨ feat: added metrics service * ✨ feat: added metrics API controller * ✨ feat: added metrics API middleware * ✨ feat: added metrics API routes * 🏷️ chore: added metrics API related types * 🎨 chore: added events table to MatrixDB collections * 🎨 chore: export metrics API * 🎨 feat: integrate matrics API routes to main app * 🚨 chore: lint * 🧪 chore: added controller tests * 🧪 chore: added middleware test * 🧪 chore: added route test * 🧪 chore: added metrics service test * 🐛 fix: swagger openapi docs * 📝 chore: generate swagger docs commit 3ca01a9 Author: Khaled Ferjani <kferjani@linagora.com> Date: Thu Oct 10 13:51:11 2024 +0200 ✨ QRCode API (#148) * ✨ feat: added QRCode service * ✨ feat: added QRCode API controller * ✨ feat: added QRCode API Router * 🏷️ chore: add QRCode API types * ✨ feat: added QRCode API * ➕ chore(deps): added qrcode deps * ✅ chore: add unit tests * 🏷️ chore: added qr_code_url to the config * ✨ feat: use a QRCode url config * ✅ chore: update unit tests * 📝 chore: update swagger docs * 🔧 chore: add qr_code_url to default config * 🧪 chore: update test config * ✨ feat: added qrcode token service * ✨ feat: added qrcode service * 🎨 chore: expose services * 🎨 feat: use exposes services * 🏷️ chore: update qrcode API related types * ✅ chore: add service tests * 🧪 chore: update controller tests * 🔇 chore: remove console log * 🏷️ chore: add oidc flow related types * ✨ feat: fetch access_token using OIDC * 🎨 feat: use cookies to start the oidc flow * 🐛 fix: Dockerfile QR CODE env variable init * ✨ feat: use OIDC flow to request a new access_token * 🧪 chore: update token service unit tests * 🏷️ chore: add oidc flow related types * 🧪 chore: update controllers unit test commit 30c9591 Author: Yadd <yadd@debian.org> Date: Thu Jul 18 10:38:31 2024 +0400 Don't build matrix invite for arm commit da06543 Author: Yadd <yadd@debian.org> Date: Thu Jul 18 09:40:40 2024 +0400 Reduce architecture list commit 175cd1a Author: Yadd <yadd@debian.org> Date: Thu Jul 18 09:40:14 2024 +0400 Fix matrix-invite build commit 0e6b793 Author: Yadd <yadd@debian.org> Date: Thu Jul 18 08:23:36 2024 +0400 Switch to docker/build-push-action@v4 commit b5627bd Author: Yadd <yadd@debian.org> Date: Thu Jul 18 08:18:20 2024 +0400 Switch to docker/build-push-action@v4 commit 2ac672d Author: Yadd <yadd@debian.org> Date: Thu Jul 18 08:04:05 2024 +0400 Publish on ARM also commit b544a90 Author: Yadd <yadd@debian.org> Date: Thu Jul 18 07:23:52 2024 +0400 Drop nx cache during docker build commit 034db33 Author: Yadd <yadd@debian.org> Date: Thu Jul 18 06:19:50 2024 +0400 Merge full-id-service commit 964e22d Merge: c7d605c 4cb056a Author: Yadd <yadd@debian.org> Date: Mon Jul 15 13:07:01 2024 +0400 Merge pull request #41 from artembru/patch-1 Update README.md commit 4cb056a Merge: 6982d7d c7d605c Author: Yadd <yadd@debian.org> Date: Mon Jul 15 13:06:31 2024 +0400 Merge branch 'master' into patch-1 commit c7d605c Merge: b38abac dd7727f Author: Yadd <yadd@debian.org> Date: Fri Jul 12 20:13:59 2024 +0400 Merge pull request #112 from rezk2ll/#99-update 🎨 added update recovery words route (#99) commit dd7727f Author: Khaled FERJANI <kferjani@linagora.com> Date: Fri Jul 12 12:40:28 2024 +0100 🧪 chore: fix tests commit 1889bbb Author: Khaled FERJANI <kferjani@linagora.com> Date: Fri Jul 12 11:50:41 2024 +0100 🧪 chore: update tests commit 51a899a Author: Khaled FERJANI <kferjani@linagora.com> Date: Fri Jul 12 11:43:15 2024 +0100 🐛 fix: place data check inside try block commit 308df16 Author: Khaled FERJANI <kferjani@linagora.com> Date: Fri Jul 12 11:41:30 2024 +0100 📝 chore: update swagger docs commit 32eb5ff Author: Khaled FERJANI <kferjani@linagora.com> Date: Fri Jul 12 11:35:33 2024 +0100 📝 feat: added update recovery words route and openapi docs commit ad7c03a Author: Khaled FERJANI <kferjani@linagora.com> Date: Fri Jul 12 11:30:55 2024 +0100 🧪 chore: update tests commit b9e39b7 Author: Khaled FERJANI <kferjani@linagora.com> Date: Fri Jul 12 11:30:43 2024 +0100 🎨 fix: prevent recovery words creation when the user already has one commit b38abac Author: Khaled Ferjani <kferjani@linagora.com> Date: Tue Jul 9 15:08:42 2024 +0100 🐛 fix: update existing active contacts (#104) * 🐛 fix: update existing active contacts * 🧪 chore: update tests commit 7037b9f Author: Khaled FERJANI <kferjani@linagora.com> Date: Tue Jul 9 14:24:22 2024 +0100 🎨 chore: fix typo in success message commit 54d0c54 Author: Khaled FERJANI <kferjani@linagora.com> Date: Tue Jul 9 14:09:43 2024 +0100 🧪 chore: update tests commit e6f08ac Author: Khaled FERJANI <kferjani@linagora.com> Date: Tue Jul 9 14:09:29 2024 +0100 🐛 fix: update existing recovery words commit 3af3865 Merge: 6b83164 f36b4a9 Author: Yadd <yadd@debian.org> Date: Tue Jul 9 06:16:01 2024 +0400 Merge pull request #95 from rezk2ll/active-contacts ✨ added active contacts API commit f36b4a9 Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 22:37:17 2024 +0100 🗃️ chore: added activeContacts table schema commit 4161d4f Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 19:54:31 2024 +0100 👷 chore: generate swagger docs commit ec965e0 Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 19:53:49 2024 +0100 📝 feat: added swagger docs commit b09d36e Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 19:12:44 2024 +0100 ✅ chore: fixed route tests commit 1da7ee2 Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 19:11:58 2024 +0100 🎨 chore(service): fixed a typo in table name commit 383d1a6 Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 19:11:19 2024 +0100 🧪 chore: add service tests commit ba4d546 Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 14:20:28 2024 +0100 🎨 feat: expose active contacts API commit 8e1b5f2 Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 14:18:35 2024 +0100 🧪 feat: added tests commit 3ae2fcd Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 14:18:25 2024 +0100 🎨 chore: export active contacts API commit d15d4b2 Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 14:17:47 2024 +0100 🏷️ chore: added active contacts related types commit d209bbb Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 14:17:26 2024 +0100 ✨ feat: added active contacts route commit 54c1f98 Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 14:17:10 2024 +0100 ✨ feat: added active contacts middleware commit b525758 Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 14:16:52 2024 +0100 ✨ feat: added active contacts controller commit 142dd95 Author: Khaled FERJANI <kferjani@linagora.com> Date: Mon Jul 8 14:16:31 2024 +0100 ✨ feat: added active contacts service commit 6982d7d Author: artembru <146178981+artembru@users.noreply.github.com> Date: Thu Jul 4 16:18:24 2024 +0200 Update README.md Deleted website URL commit 3385816 Author: artembru <146178981+artembru@users.noreply.github.com> Date: Tue Jun 25 11:32:54 2024 +0200 Update README.md commit 6b83164 Merge: 3ce8304 3d6e44b Author: Yadd <yadd@debian.org> Date: Mon Jun 24 09:28:47 2024 +0400 Merge pull request #59 from linagora/drop-console-during-test Hide console debug during test commit 3d6e44b Author: Yadd <yadd@debian.org> Date: Thu Jun 20 06:48:06 2024 +0400 Hide console debug during test commit 3ce8304 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Jun 18 19:09:52 2024 +0000 chore(deps-dev): bump ws in the npm_and_yarn group across 1 directory Bumps the npm_and_yarn group with 1 update in the / directory: [ws](https://github.com/websockets/ws). Updates `ws` from 7.5.9 to 7.5.10 - [Release notes](https://github.com/websockets/ws/releases) - [Commits](websockets/ws@7.5.9...7.5.10) --- updated-dependencies: - dependency-name: ws dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> commit fcdd0b1 Author: artembru <146178981+artembru@users.noreply.github.com> Date: Thu Jun 6 17:00:13 2024 +0200 Update README.md Updated background picture and links
feature
Prerequisites
the user must be connected
the web auth cookie must be included in the request: ie
lemonldap
example:
closes linagora/twake-on-matrix#1764
demo
API using Postman
qrcode decode using mobile ( without mobile magic link )
Screenrecorder-2024-10-08-11-55-51-892.mp4