You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-07 21:23:00 +03:00
Clean up the MatrixChat initSession code (#11403)
`async` functions are a thing, and they make this much more comprehensible.
This commit is contained in:
committed by
GitHub
parent
f65c6726c9
commit
672ad98ec7
@@ -204,6 +204,7 @@ export async function attemptDelegatedAuthLogin(
|
||||
fragmentAfterLogin?: string,
|
||||
): Promise<boolean> {
|
||||
if (queryParams.code && queryParams.state) {
|
||||
console.log("We have OIDC params - attempting OIDC login");
|
||||
return attemptOidcNativeLogin(queryParams);
|
||||
}
|
||||
|
||||
@@ -297,6 +298,8 @@ export function attemptTokenLogin(
|
||||
return Promise.resolve(false);
|
||||
}
|
||||
|
||||
console.log("We have token login params - attempting token login");
|
||||
|
||||
const homeserver = localStorage.getItem(SSO_HOMESERVER_URL_KEY);
|
||||
const identityServer = localStorage.getItem(SSO_ID_SERVER_URL_KEY) ?? undefined;
|
||||
if (!homeserver) {
|
||||
|
Reference in New Issue
Block a user