Skip to content

Commit

Permalink
Merge pull request #86 from Elenpay/85-nodeguard-mfa-not-working-in-p…
Browse files Browse the repository at this point in the history
…roduction

85 nodeguard mfa not working in production
  • Loading branch information
markettes authored Feb 1, 2023
2 parents 7a65d65 + cd128ff commit fad4713
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
NBXPLORER_BTCRPCURL: http://host.docker.internal:18443/
NBXPLORER_BTCRPCUSER: "polaruser"
NBXPLORER_URI: http://nbxplorer:32838
TRANSACTION_CONFIRMATION_MINIMUM_BLOCKS: "6"
POSTGRES_CONNECTIONSTRING: Host=127.0.0.1;Port=5432;Database=fundsmanager;Username=rw_dev;Password=rw_dev
PUSH_NOTIFICATIONS_ONESIGNAL_API_BASE_PATH: "https://onesignal.com/api/v1"
PUSH_NOTIFICATIONS_ONESIGNAL_APP_ID: "93800910-9a17-46c7-a3a0-175b68c7aea0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ private async Task LoadSharedKeyAndQrCodeUriAsync(ApplicationUser user)

SharedKey = FormatKey(unformattedKey);

var email = await _userManager.GetEmailAsync(user);
AuthenticatorUri = GenerateQrCodeUri(email, unformattedKey);
var userName = await _userManager.GetUserNameAsync(user);
AuthenticatorUri = GenerateQrCodeUri(userName, unformattedKey);
}

private string FormatKey(string unformattedKey)
Expand All @@ -176,13 +176,13 @@ private string FormatKey(string unformattedKey)
return result.ToString().ToLowerInvariant();
}

private string GenerateQrCodeUri(string email, string unformattedKey)
private string GenerateQrCodeUri(string username, string unformattedKey)
{
return string.Format(
CultureInfo.InvariantCulture,
AuthenticatorUriFormat,
_urlEncoder.Encode("NodeGuard"),
_urlEncoder.Encode(email),
_urlEncoder.Encode(username),
unformattedKey);
}
}
Expand Down

0 comments on commit fad4713

Please sign in to comment.