closeio / closeio/sync-engine

Update `/me` endpoint for Microsoft accounts

Open
#339 1 comment 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
30
Forks
13
Avg merge
1d 2h
Merged PRs (30d)
8

Description

https://github.com/closeio/sync-engine/blob/e19ff46f3ca8a1cb7fcfbdb6d0cc3cd10fe1a063/inbox/auth/microsoft.py#L37

Used in _get_user_info.

  • Should use https://graph.microsoft.com/v1.0/me instead.
  • Since the scope required (User.Read) is different from the ones in OAUTH_SCOPE, I suggest the following approach:
    • Override _get_user_info in MicrosoftAuthHandler, so it calls the parent method with a copy of session_dict where session_dict["access_token"] has been replaced with an access token with the right scope.
    • That access token (with User.Read scope) has to be requested just before calling the parent method, using the AuthAlligator client.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.