Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example how to implement a token generator in Xamarin.Forms Applications. - http://julianocustodio.com/token
public void Callback(object state)
{
totp = new Totp(secretKey);
Codigo = totp.ComputeTotp();
var remainingTime = totp.RemainingSeconds();
Segundos = $"00:{remainingTime:00}";
}
protected override void OnAppearing()
{
base.OnAppearing();
timer = new Timer(Callback, null, 0, 1000);
}
protected override void OnDisappearing()
{
timer.Dispose();
base.OnDisappearing();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.