Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AppContext.tsx #52

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

cameronzuziak
Copy link

Purpose

Fixed issue related to authentication. getProfilePhoto on line 106 was returning 404 in cases where users don't have an avatar. getProfilePhoto returning 404 was caught by the catch statement, meaning the remainder of the code in the try statement after line 106 was never executed. Also setAuthenticated was never being called in that same try catch statement, so I added that. Additionally, accessToken and sessionId were never set on initial signin, so I set added that too, and wrapped in a try catch statement just incase. Let me know if there are any changes I need to make.
Thanks,
Cameron Zuziak

Does this introduce a breaking change?

[ ] Yes
[X ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[X ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Fixed issue related to authentication.  getProfilePhoto on line 106 was returning 404 in cases where users don't have an avatar, which cause caught by the catch statement, meaning the remainder of the code in the try statement after line 106 was never executed. Also setAuthenticated was never being called in that same try catch stement, so I added that. Also accessToken and sessionId were never set on initial login, so I set added that, and wrapped in a try catch statement just incase.
@cameronzuziak
Copy link
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant