Skip to content

Commit

Permalink
FallbackAuthenticator catch exceptions from validators
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaBs committed Jul 7, 2023
1 parent b55fa9a commit a76e8dc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/XboxAuthNet.Game/Authenticators/FallbackAuthenticator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ private async ValueTask tryAuth(AuthenticateContext context)
var authenticator = Authenticators.ElementAt(i);
var validator = Validators.ElementAt(i);

var valid = await validator.Validate(context);
if (valid)
continue;

try
{
var valid = await validator.Validate(context);
if (valid)
continue;
await authenticator.ExecuteAsync(context);
return;
}
Expand Down

0 comments on commit a76e8dc

Please sign in to comment.