element-web/src/stores
Kerry 84ca519b3f
OIDC: revoke tokens on logout (#11718)
* test persistCredentials without a pickle key

* test setLoggedIn with pickle key

* lint

* type error

* extract token persisting code into function, persist refresh token

* store has_refresh_token too

* pass refreshToken from oidcAuthGrant into credentials

* rest restore session with pickle key

* retreive stored refresh token and add to credentials

* extract token decryption into function

* remove TODO

* very messy poc

* utils to persist clientId and issuer after oidc authentication

* add dep oidc-client-ts

* persist issuer and clientId after successful oidc auth

* add OidcClientStore

* comments and tidy

* expose getters for stored refresh and access tokens in Lifecycle

* revoke tokens with oidc provider

* test logout action in MatrixChat

* comments

* prettier

* test OidcClientStore.revokeTokens

* put pickle key destruction back

* comment pedantry

* working refresh without persistence

* extract token persistence functions to utils

* add sugar

* implement TokenRefresher class with persistence

* tidying

* persist idTokenClaims

* persist idTokenClaims

* tests

* remove unused cde

* create token refresher during doSetLoggedIn

* tidying

* also tidying

* OidcClientStore.initClient use stored issuer when client well known unavailable

* test Lifecycle.logout

* update Lifecycle test replaceUsingCreds calls

* fix test

* tidy

* test tokenrefresher creation in login flow

* test token refresher

* Update src/utils/oidc/TokenRefresher.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* use literal value for m.authentication

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* improve comments

* fix test mock, comment

* typo

* add sdkContext to SoftLogout, pass oidcClientStore to logout

* fullstops

* comments

* fussy comment formatting

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-10-15 21:35:25 +00:00
..
local-echo Migrate more strings to translation keys (#11665) 2023-09-25 18:12:41 +01:00
notifications Migrate more strings to translation keys (#11665) 2023-09-25 18:12:41 +01:00
oidc OIDC: revoke tokens on logout (#11718) 2023-10-15 21:35:25 +00:00
right-panel Migrate more strings to translation keys (#11665) 2023-09-25 18:12:41 +01:00
room-list Migrate more strings to translation keys (#11672) 2023-09-27 17:15:22 +01:00
spaces Migrate more strings to translation keys (#11613) 2023-09-19 17:16:38 +01:00
widgets Migrate more strings to translation keys (#11665) 2023-09-25 18:12:41 +01:00
AccountPasswordStore.ts Do not prompt for a password when doing a „reset all“ after login (#10208) 2023-02-23 08:46:49 +01:00
ActiveWidgetStore.ts Switch to importing models/room-state & models/room-member from main js-sdk export (#11362) 2023-08-04 11:22:08 +00:00
AsyncStore.ts Remove flux dependency (#10313) 2023-03-08 14:19:05 +00:00
AsyncStoreWithClient.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
AutoRageshakeStore.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
BreadcrumbsStore.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
CallStore.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
LifecycleStore.ts Remove flux dependency (#10313) 2023-03-08 14:19:05 +00:00
MemberListStore.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
ModalWidgetStore.ts Conform more of the codebase to strictNullChecks (#11134) 2023-06-27 17:39:56 +01:00
NonUrgentToastStore.ts Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
OwnBeaconStore.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
OwnProfileStore.ts Migrate more strings to translation keys (#11498) 2023-08-31 11:22:10 +01:00
ReadyWatchingStore.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
RoomScrollStateStore.ts Conform more of the codebase to strict typescript (#10841) 2023-05-25 09:39:23 +01:00
RoomViewStore.tsx Migrate more strings to translation keys (#11665) 2023-09-25 18:12:41 +01:00
SetupEncryptionStore.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
ThreepidInviteStore.ts Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
ToastStore.ts Revert "Implement new toast UI (#10467)" (#10740) 2023-04-28 14:56:26 +00:00
TypingStore.ts Conform more of the codebase to strictNullChecks (#10800) 2023-05-10 08:41:55 +01:00
UIStore.ts Improve typescript null checking in places (#10073 (#10073 2023-02-03 15:27:47 +00:00
UserProfilesStore.ts Check profiles before starting a DM (#10472) 2023-04-05 13:13:51 +02:00
VoiceRecordingStore.ts Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
WidgetEchoStore.ts Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
WidgetStore.ts Handle ManagedHybrid widgets in useRoomCall and mark them in the widget state event 2023-09-11 11:39:30 +01:00