You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To test protected endpoints that require a user to be logged in, follow these steps:
53
+
54
+
1.**Sign Up**: Create a user account using the `POST /auth/signup/email` endpoint.
55
+
2.**Log In**: Use the `POST /auth/login/email` endpoint with the same credentials.
56
+
3.**Copy Token**: From the successful login response, copy the `access_token` value.
57
+
4.**Authorize**: In the FastAPI docs (`/docs`), click the top-right "Authorize" button. In the popup, paste your token in the format `Bearer <your_token>`.
58
+
5.**Test**: You can now successfully test any protected endpoint (e.g., `GET /users/me`).
59
+
60
+
50
61
## Database
51
62
52
63
The application uses MongoDB for data storage. Make sure MongoDB is running and accessible via the connection string in your `.env` file.
0 commit comments