Allow dynamic MSAL Authority (#896)

This commit is contained in:
Steve Faulkner
2021-06-16 09:13:11 -05:00
committed by GitHub
parent 914c372f5b
commit 6f68c75257
7 changed files with 23 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
import { configContext } from "../ConfigContext";
export async function fetchPhoto(accessToken: string): Promise<Blob | void> {
const headers = new Headers();
@@ -12,7 +13,7 @@ export async function fetchPhoto(accessToken: string): Promise<Blob | void> {
headers: headers,
};
return fetch("https://graph.windows.net/me/thumbnailPhoto?api-version=1.6", options).then((response) =>
return fetch(`${configContext.GRAPH_ENDPOINT}/me/thumbnailPhoto?api-version=1.6`, options).then((response) =>
response.blob()
);
}