Skip to content

Commit

Permalink
Rename constant to avoid collision
Browse files Browse the repository at this point in the history
This wasn't actually affecting us, but it was causing developer (me)
confusion: we declare the `user` const in this block, and then again in
a lower scope (the API callback).

To alleviate that confusion, I renamed the constant at this scope.

Done during but not directly related to #2023.
  • Loading branch information
reefdog committed Aug 23, 2021
1 parent ebe16c5 commit cee6aef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/auth0_sign_in_callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const AccessTokenHandler = function (req, res) {
const refreshToken = body.refresh_token
const idToken = body.id_token
const accessToken = body.access_token
const user = await auth0.getProfile(accessToken)
const auth0User = await auth0.getProfile(accessToken)

const apiRequestBody = getUserInfo(user)
const apiRequestBody = getUserInfo(auth0User)
const endpoint = `${config.restapi.protocol}${req.headers.host}/api/v1/users`
const apiRequestOptions = {
headers: {
Expand Down

0 comments on commit cee6aef

Please sign in to comment.