* Add token null check * Revert "Add token null check" This reverts commit 662f04935e758e0557d7d162e1fad2a559944235. * Update AuthenticationService.ts
@@ -125,7 +125,7 @@ class MsalAuthorizeService implements AuthorizeService {
async getTokenCore(scopes?: string[]): Promise<AccessToken | undefined> {
const account = this.getAccount();
if (!account) {
- return;
+ throw new Error('Failed to retrieve token, no account found.');
}
this._requestedScopes = scopes;