Commit Graph

32 Commits

Author SHA1 Message Date
833a5d1191 fix: sso refresh token race condition (#405)
With NextAuth, there is a race condition of the current implementation
of refreshToken using multiple tab. Because getSession() is broadcasted
(or triggered by another component, window focus or such), we may ask
for the jwt() to be refreshed at the same time.

The problem is the first time will go correctly, while all others calls
will be rejected as they are using a revoked token.

This redis lock is per-user, and will use redis lock as a source of
truth.
2024-09-05 00:47:02 +02:00
03561453c5 feat: Monadical SSO as replacement of Fief (#393)
* sso: first pass for integrating SSO

still have issue on refreshing
maybe customize the login page, or completely avoid it
make 100% to understand how session server/client are working
need to test with different configuration option (features flags and
requireLogin)

* sso: correctly handle refresh token, with pro-active refresh

Going on interceptors make extra calls to reflector when 401.
We need then to circle back with NextJS backend to update the jwt,
session, then retry the failed request.

I prefered to go pro-active, and ensure the session AND jwt are always
up to date.

A minute before the expiration, we'll try to refresh it. useEffect() of
NextJS cannot be asynchronous, so we cannot wait for the token to be
refreshed.

Every 20s, a minute before the expiration (so 3x in total max) we'll try
to renew. When the accessToken is renewed, the session is updated, and
dispatching up to the client, which updates the useApi().

Therefore, no component will left without a incorrect token.

* fixes: issue with missing key on react-select-search because the default value is undefined

* sso: fixes login/logout button, and avoid seeing the login with authentik page when clicking

* sso: ensure /transcripts/new is not behind protected page, and feature flags page are honored

* sso: fixes user sub->id

* fixes: remove old layout not used

* fixes: set default NEXT_PUBLIC_SITE_URL as localhost

* fixes: removing fief again due to merge with main

* sso: ensure session is always ready before doing any action

* sso: add migration from fief to jwt in server, only from transcripts list

* fixes: user tests

* fixes: compilation issues
2024-09-03 19:27:15 +02:00
83756116a6 Update packages 2024-08-30 21:26:11 +02:00
c2595b616b Zulip auto post 2024-08-27 01:04:04 +02:00
2381428ae2 Link recorded meeting to a transcript 2024-08-09 17:30:45 +02:00
92a99fba2c Migrate to the latest openapi-ts 2024-07-03 16:33:53 +02:00
ef531f6491 Migrate to openapi-ts generator 2024-07-03 15:09:05 +02:00
c36b64cff1 Upgrade to latest openapi codegen 2024-07-03 14:21:38 +02:00
Sara
23b52a6d1f change browse page to new design 2024-01-15 15:54:02 +01:00
Sara
088be8d9cc fix loading indication 2024-01-03 15:52:26 +01:00
Sara
de88425a02 Merge branch 'main' of github.com:Monadical-SAS/reflector into sara/feat-speaker-reassign 2024-01-02 19:20:56 +01:00
Koper
184cfc7bc3 Adding eslint 2024-01-02 18:22:58 +07:00
Andreas
c603e279df Implemented suggestions by Matthieu 2024-01-01 10:31:43 +07:00
Koper
9f42c4d8a7 NextJS 14 experimental upgrade 2023-12-26 20:49:40 +07:00
43a3e17c0b WIP 2023-12-20 12:02:10 +01:00
Sara
01c7f47250 try chakra-ui 2023-12-14 19:27:16 +01:00
Koper
ba40d28152 Send to zulip 2023-11-20 21:39:33 +07:00
dependabot[bot]
99796d045b build(deps): bump @sentry/nextjs from 7.64.0 to 7.77.0 in /www
Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.64.0 to 7.77.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/7.64.0...7.77.0)

---
updated-dependencies:
- dependency-name: "@sentry/nextjs"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-16 14:32:00 +00:00
907f4be67a www: fix mp3 download while authenticated 2023-11-03 11:47:58 +01:00
Sara
4a69bffc9c Implement multi tenancy 2023-11-02 12:24:52 +01:00
Sara
47fc52af11 adds three-letter language picker 2023-10-13 23:35:19 +02:00
projects-g
1d92d43fe0 New summary (#283)
* handover final summary to Zephyr deployment

* fix display error

* push new summary feature

* fix failing test case

* Added markdown support for final summary

* update UI render issue

* retain sentence tokenizer call

---------

Co-authored-by: Koper <andreas@monadical.com>
2023-10-13 22:53:29 +05:30
andreas
be773d99bd QR Code Link 2023-09-27 18:26:15 +02:00
Koper
1b1e67901c FIEF NextJS 2023-08-17 22:57:59 +07:00
Koper
ebbf47b895 Migrate to typescript 2023-08-16 17:55:47 +07:00
Mathieu Virbel
f8fc83c943 server/www: simplify operationId in openapi and update www 2023-08-10 14:52:35 +02:00
Koper
e8c054b4ca Implemented API from code generated by OpenAPI 2023-08-10 18:33:50 +07:00
Koper
0ff8eb2cf3 Front end API implementation (draft) 2023-08-08 21:18:54 +07:00
Koper
be6c10cc9d Sentry (www) 2023-08-02 16:20:29 +07:00
Mathieu Virbel
ee080e1ab2 www: update to use yarn and not npm 2023-07-27 16:58:41 +02:00
Koper
1b4883963f Update yarn.lock 2023-07-26 15:43:23 +07:00
Koper
401aa1e6f9 Merged reflector-ui (now "www") into single repo 2023-07-26 15:18:05 +07:00