giveConsent method
Future<AuthPublicResponse>
giveConsent(
{ - required String challenge,
- required bool consent,
})
Implementation
Future<SoftcorpGrpc.AuthPublicResponse> giveConsent(
{required String challenge, required bool consent}) async {
if (testMode == true) {
print("giveConsent");
}
if (mockMode == true) {
return await Future.delayed(const Duration(seconds: 2)).then((_) {
return SoftcorpGrpc.AuthPublicResponse()
..redirectAddr = "http://localhost:3050/success";
});
}
SoftcorpGrpc.AuthPublicRequest req = SoftcorpGrpc.AuthPublicRequest();
req.challenge = challenge;
req.consent = consent;
return client.giveConsent(req);
}