Skip to content

Commit

Permalink
MS Graph login flow and fixes (#505)
Browse files Browse the repository at this point in the history
- Calendar and email: default MS Graph login on start up or triggering
action to silent mode (i.e. don't prompt user).
- If it cannot authenticate, then return error message to use `@calendar
login` or `@email login` to explicit trigger the device sign in prompt.
- With the explicit login commands, display the device login flow prompt
on the chat view, and wait for login to complete.
- Add explicit `@calendar logout` and `@email logout` to explicit switch
to auth state.

- Background indexCalendarThread: properly track the setInterval return
so that it can actually stop
- Use `proper-lock` library to use the fs to prevent multiple silent
flow log in attempt.
- Switch `console.log` to use the `debug` package in calendar/email and
graph util
- Clean up `GraphClient` API, remove unused code. Also no need to track
access token expiry. The azure library takes cares for that.
- Fix spelling of variable `calendatDataIndex` => `calendarDataIndex`
  • Loading branch information
curtisman authored Dec 17, 2024
1 parent e7580ed commit 827292a
Show file tree
Hide file tree
Showing 12 changed files with 532 additions and 714 deletions.
2 changes: 2 additions & 0 deletions ts/packages/agents/agentUtils/graphUtils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"debug": "^4.3.4",
"dotenv": "^16.3.1",
"find-config": "^1.0.0",
"proper-lockfile": "^4.1.2",
"rimraf": "^5.0.5",
"string-compare": "^1.1.2",
"typeagent": "workspace:*"
Expand All @@ -48,6 +49,7 @@
"@types/find-config": "1.0.4",
"@types/jest": "^29.5.7",
"@types/node": "^18.18.7",
"@types/proper-lockfile": "^4.1.4",
"copyfiles": "^2.4.1",
"jest": "^29.7.0",
"prettier": "^3.2.5",
Expand Down
Loading

0 comments on commit 827292a

Please sign in to comment.