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

authenticate: remove extra UpdateUserInfo() call #4813

Merged
merged 3 commits into from Dec 5, 2023

Conversation

kenjenkins
Copy link
Contributor

Summary

The buildIdentityProfile() method is called only from Authenticate.getOAuthCallback() (L454), which has previously called Authenticator.Authenticate() (L437). It looks like all implementations of the Authenticator interface already call UpdateUserInfo() from Authenticate() (oidc, apple, github), so we shouldn't need to call UpdateUserInfo() a second time from buildIdentityProfile().

This should simplify the code a little and provide a slight performance improvement (by avoiding one network request).

Related issues

User Explanation

Checklist

  • reference any related issues
  • updated docs
  • updated unit tests
  • updated UPGRADING.md
  • add appropriate tag (improvement / bug / etc)
  • ready for review

The buildIdentityProfile() method is called only from
Authenticate.getOAuthCallback(), which has previously called
Authenticator.Authenticate(). It looks like all implementations of the
Authenticator interface already call UpdateUserInfo(), so we shouldn't
need to call UpdateUserInfo() a second time from buildIdentityProfile().

This should simplify the code a little and provide a slight performance
improvement (by avoiding one network request).
@kenjenkins kenjenkins requested a review from a team as a code owner December 4, 2023 21:46
@coveralls
Copy link

coveralls commented Dec 4, 2023

Coverage Status

coverage: 62.756% (-0.03%) from 62.783%
when pulling 72e69b1 on kenjenkins/remove-extra-user-info-call
into 2edd63c on main.

@kenjenkins kenjenkins merged commit 3c4b03f into main Dec 5, 2023
9 checks passed
@kenjenkins kenjenkins deleted the kenjenkins/remove-extra-user-info-call branch December 5, 2023 17:22
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.

None yet

3 participants