createCredential method
Implementation
Future<FirebaseAppAuthCredential> createCredential(
{String? eventId,
String? sessionId,
String? providerId,
String? link}) async {
var box = await PersistenceStorage.openBox('firebase_auth');
sessionId = sessionId ?? box.get('redirect_session_id');
if (eventId != null) {
var storedEventId = box.get('redirect_event_id');
if (storedEventId != eventId) {
throw FirebaseAuthException.noAuthEvent();
}
await box.delete('redirect_event_id');
}
return FirebaseAppAuthCredential(
providerId: providerId ?? 'unknown',
sessionId: sessionId!,
link: link!);
}