CityofToronto / bdit_flashcrow

Working repository for MOVE, a project to modernize transportation data systems at the City of Toronto.
MIT License
9 stars 2 forks source link

Update Backend for ADFS #1288

Closed ryanpdaley closed 2 months ago

ryanpdaley commented 2 months ago

Issue Addressed

This PR closes MOVE-1263 and MOVE-1265 image

Description

Adds the extra fields that we can currently get from ADFS to the database:

I'm not sure which of these will be populated within ADFS for production accounts, so they will be returned as null if they aren't defined or are blank.

There is also an issue that we were using the sub value as the unique key for a user and in local the new client_id is returning new values for this, so get duplicate values. I've tried to mitigate this by looking for an email match, and updating the user record (including the sub value) if a sub match isn't found.

Tests

All existing tests are passing, but no new tests were created for this yet.

spencermountain commented 2 months ago

TIL nodejs does not have a atob method. LGTM!

mkewins commented 2 months ago

cool!!