You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The library is directly dependant on "QRCoder" nuget package, so the clients are locked in to this library to authenticate. A good way to avoid this is to defer QR code generation through a delegate that should be implemented by the client code, something like:
publicasyncTaskAutenticateWithQrCodeAsync(Action<Guid>printQrCode){if(string.IsNullOrEmpty(_authToken)){awaitGetTokenAsync();}printQrCode(_qrCodeId);// Calls the action passed by the caller (in the example program it could be the GetQrCodeAsAscii stuff);varpayload=new{qr_code_id=_qrCodeId,type="login-webapp"};while(!IsAuthenticated())// Could have an attempt limit{varresponse=await_client.PostAsync<Dictionary<string,object>>(_endpoints.Lift,payload,GetHeaders());if(Succeeded(response)){break;}awaitTask.Delay(2000);}FillTokens(response);FillAutenticatedUrls(response);}
The text was updated successfully, but these errors were encountered:
@natenho I will think about it, but I am worry about to difficult the usage of package, maybe we can keep the core of library without QRCode dependency (using something like you propose) and create another package with an extension for generate QRCode to make the usage simple. This way if clients wants to avoid lock with QRCode library they use core package, but if they aren't worry about it, they can use directly the extension package.
The library is directly dependant on "QRCoder" nuget package, so the clients are locked in to this library to authenticate. A good way to avoid this is to defer QR code generation through a delegate that should be implemented by the client code, something like:
The text was updated successfully, but these errors were encountered: