toJson method
Serializes a set of credentials to JSON.
Nothing is guaranteed about the output except that it's valid JSON and compatible with Credentials.toJson.
Implementation
String toJson() => jsonEncode({
'accessToken': accessToken,
'refreshToken': refreshToken,
'idToken': idToken,
'tokenEndpoint': tokenEndpoint?.toString(),
'scopes': scopes,
'expiration': expiration?.millisecondsSinceEpoch
});