feat: add oauth2 credential file handling

This commit is contained in:
Udhay-Adithya
2025-07-21 23:07:34 +05:30
parent 4e924fc946
commit f458d00341
6 changed files with 122 additions and 32 deletions

View File

@@ -170,11 +170,7 @@ Future<HttpRequestModel> handleAuth(
throw Exception("No Redirect URL found!");
}
//TODO: Create a proper credentials file path, use the existing file utils if needed.
final credentialsDir = Directory.systemTemp;
final credentialsFile = File(
'${credentialsDir.path}/oauth2_credentials.json',
);
final credentialsFile = File(oauth2.credentialsFilePath);
switch (oauth2.grantType) {
case OAuth2GrantType.authorizationCode: