Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IApiAuthParams.TwoFactorAuthorizationAsync должен иметь тип Func<Task<string>>, а не Task<string> #1589

Open
KirillAldashkin opened this issue Sep 12, 2023 · 0 comments
Milestone

Comments

@KirillAldashkin
Copy link

KirillAldashkin commented Sep 12, 2023

Тип Task<string> представляет собой не асинхронный метод, возвращающий string, а процесс выполнения такого метода. На данный момент добавление асинхронного обработчика 2FA:

await api.AuthorizeAsync(new ApiAuthParams()
{
    TwoFactorAuthorizationAsync = TwoFactorAsync(),
    ......
});

Вызывает метод для получения кода 2FA в момент его присваивания, а не в тот момент, когда потребовался код 2FA.


Из-за этого асинхронную 2FA в данный момент реализовать невозможно.

@inyutin-maxim inyutin-maxim modified the milestones: v1.78.0, v1.79.0 Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants