Skip to content

Commit

Permalink
Fix Null Reference Exception (#468)
Browse files Browse the repository at this point in the history
- Added a null check when accessing the token result which can be null
if there is an underlying MSAL or tokenprovider error.
- related to issue #455
  • Loading branch information
embetten committed Jan 31, 2024
1 parent d6aba72 commit 447da8a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public override async Task<GetAuthenticationCredentialsResponse> HandleRequestAs
try
{
var result = await tokenProvider.GetTokenAsync(tokenRequest, cancellationToken);
bearerToken = result.AccessToken;
bearerToken = result?.AccessToken;
}
catch (Exception ex)
{
Expand Down

0 comments on commit 447da8a

Please sign in to comment.