dotkom / monoweb

Future version of Online, NTNU's informatics student association's website
https://web.online.ntnu.no/
MIT License
19 stars 2 forks source link

Fix user syncing issue #921

Closed henrikskog closed 6 months ago

henrikskog commented 6 months ago

The syncing service was using the ow user id from user in auth0 to decide if user exists in local db or not. However, stuff might happen such that a local user has been created but id is not updated in auth0. I'm not sure how this can happen but it just happened to me locally. Using auth0 id to check if user exists locally is safer because they will always be the same.

Also fixes some logging statements that were not using string interpolation.

henrikhorluck commented 6 months ago

Do we not store the auth0 sub? We currently support freely changing emails so you should rather use the sub

henrikskog commented 6 months ago

Ah yes we do, good suggestion! That's better.