copyWith method
Refreshes this token with the new accessToken and expiresIn.
Specify the refreshToken when the provider rotated it, otherwise the
current one is kept.
Implementation
OauthToken copyWith(
String accessToken,
int expiresIn, {
String? refreshToken,
String? scope,
}) => OauthToken(
accessToken: accessToken,
expiresIn: expiresIn,
refreshToken: refreshToken ?? this.refreshToken,
scope: scope ?? this.scope,
tokenType: tokenType,
provider: provider,
created: DateTime.now().toUtc(),
);