Closed schroerbrian closed 9 months ago
can you add a description to your PR?
can you add a description to your PR?
Sure, I have just added one
I have a few security concerns about the changes here. I think due to its central role in our user identity system, the UsersController probably needs authentication and authorization logic on all of its controller methods. I've forgotten the details about exactly what Auth0 sends us, but if you have any questions and have that info handy, I'm more than happy to talk more about the security concerns and how we can safely deal with this.
Thanks for reviewing, Richard! I think I can rejigger things to lock this down. I am going to lay out the current order of operations just to clarify it in my own mind.
I have a few security concerns about the changes here. I think due to its central role in our user identity system, the UsersController probably needs authentication and authorization logic on all of its controller methods. I've forgotten the details about exactly what Auth0 sends us, but if you have any questions and have that info handy, I'm more than happy to talk more about the security concerns and how we can safely deal with this.
Thanks for reviewing, Richard! I think I can rejigger things to lock this down. I am going to lay out the current order of operations just to clarify it in my own mind.
- User submits sign-up form
- We hit the userExists endpoint to check if user exists in our DB
- If not, we create them in Auth0
- User verifies email on our site, we forward to Auth0
- Auth0 creates user. NB: If they already exist, Auth0 will simply auth them against their servers
- Following successful Auth0 creation, we hit the create endpoint
- We establish the user session in React/Front-end
Okay so here is the brand new order of operations, woohoo. For a more detailed and clearer explanation see the documentation that I'm working on (WIP)
access_token
param), this includes JWT token and user IDI will now work on spec'ing this out in a document! Document here (in progress): https://docs.google.com/document/d/1Esfvw3nXnRgeiulCyH0Uc6XQY5FXqSZ_cR8t8XM7_go/edit
This adds name and organization columns to user table, which we will need for saving case worker users. This also creates a UserController with a
create
endpoint as well as auser_exists
endpoint. The f/e checks theuser_exists
prior to making requests to create a new user in both Auth0 and our DB. This PR also adds tests for said endpoints.