hngprojects / hng_boilerplate_python_fastapi_web

Apache License 2.0
153 stars 136 forks source link

fix: Fixed The payload returned after authentication #879

Closed johnson-oragui closed 2 months ago

johnson-oragui commented 2 months ago

Since an organization is created after a user is registered, the payload returned should include the created organization, same for when a user logs in, the payload for the response would also return or include the user's organizations, and same goes for magic link login. ​

Description

Since an organization is created after a user is registered, the payload returned should include the created organization, same for when a user logs in, the payload for the response would also return or include the user's organizations, and same goes for magic link login. ​

Related Issue (Link to issue ticket)

Motivation and Context

The frontend needs to display the organizations a user belongs to when a user logs in or registers. ​

How Has This Been Tested?

This was tested with pytest and postman ​

Screenshots (if appropriate - Postman, etc):

Test for pytest auth pytest

test for registration payload auth register

test for login auth login

test for magic-link login auth magic link

Types of changes

Checklist: