OIDC: extract success/failure handlers from token login function (#11154)

* extract success/failure handlers from token login function

* typo

* use for no homeserver error dialog too

* i18n

* tidy

* Update src/Lifecycle.ts

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

* move try again responsibility

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
Kerry
2023-06-30 10:33:44 +12:00
committed by GitHub
parent f62fe2626c
commit 3930f1a10b
3 changed files with 53 additions and 31 deletions

View File

@@ -330,6 +330,8 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
this.tokenLogin = true;
// Create and start the client
// accesses the new credentials just set in storage during attemptTokenLogin
// and sets logged in state
await Lifecycle.restoreFromLocalStorage({
ignoreGuest: true,
});