Switched to Device code authentication
This commit is contained in:
@@ -5,6 +5,8 @@ namespace OneDriveBackupService;
|
||||
|
||||
public class Worker(ILogger<Worker> logger, ConfigData config, OneDriveClient client) : BackgroundService {
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken) {
|
||||
await client.EnsureAuthenticated(stoppingToken);
|
||||
|
||||
if (Environment.GetCommandLineArgs().Contains("--run-once")) {
|
||||
logger.LogInformation("Manual backup triggered");
|
||||
await RunBackup(DateTime.Now, stoppingToken);
|
||||
|
||||
Reference in New Issue
Block a user