Upgrades to msal-browser (#781)

* Replaces msal with msal-browser

* Remove unused id, logging in returns the tenant

* format

* Fix tenant switch

* Removes v1 forceRefresh
This commit is contained in:
Zachary Foster
2021-05-17 14:10:54 -04:00
committed by GitHub
parent 4f3b2f7996
commit a06e213b81
5 changed files with 39 additions and 23 deletions

View File

@@ -1,12 +1,12 @@
jest.mock("../../../hooks/useDirectories");
import { AccountInfo } from "@azure/msal-browser";
import "@testing-library/jest-dom";
import { fireEvent, render, screen } from "@testing-library/react";
import React from "react";
import { MeControl } from "./MeControl";
import { Account } from "msal";
it("renders", () => {
const account = {} as Account;
const account = {} as AccountInfo;
const logout = jest.fn();
const openPanel = jest.fn();

View File

@@ -1,11 +1,11 @@
import { FocusZone, DefaultButton, DirectionalHint, Persona, PersonaInitialsColor, PersonaSize } from "@fluentui/react";
import { AccountInfo } from "@azure/msal-browser";
import { DefaultButton, DirectionalHint, FocusZone, Persona, PersonaInitialsColor, PersonaSize } from "@fluentui/react";
import * as React from "react";
import { Account } from "msal";
import { useGraphPhoto } from "../../../hooks/useGraphPhoto";
interface Props {
graphToken: string;
account: Account;
account: AccountInfo;
openPanel: () => void;
logout: () => void;
}
@@ -48,7 +48,7 @@ export const MeControl: React.FunctionComponent<Props> = ({ openPanel, logout, a
<Persona
imageUrl={photo}
text={account?.name}
secondaryText={account?.userName}
secondaryText={account?.username}
showSecondaryText={true}
showInitialsUntilImageLoads={true}
initialsColor={PersonaInitialsColor.teal}