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
Right now we're using get_optional_user with an additional check-and-redirect in the route body for routes like 'login' or 'register' that should only be seen by unauthenticated users. We could take 'get_optional_user' and wrap it in a check-and-redirect to create a new, nested dependency, 'require_unauthenticated_client' or something like that. Similarly, for a route like 'delete_account' that uses 'get_authenticated_user' but also requires re-entry of credentials with an additional check in the route body to confirm that the credentials match the authenticated_user, we could create a nested dependency 'get_authenticated_user_with_credentials_check' (or maybe something a bit less verbose) that wraps 'get_authenticated_user' with the extra check. Obviously, we would need to identify and update routes that could benefit from these new dependencies (which would be defined in dependencies.py). We would also need to update the test suite.
The text was updated successfully, but these errors were encountered:
Right now we're using get_optional_user with an additional check-and-redirect in the route body for routes like 'login' or 'register' that should only be seen by unauthenticated users. We could take 'get_optional_user' and wrap it in a check-and-redirect to create a new, nested dependency, 'require_unauthenticated_client' or something like that. Similarly, for a route like 'delete_account' that uses 'get_authenticated_user' but also requires re-entry of credentials with an additional check in the route body to confirm that the credentials match the authenticated_user, we could create a nested dependency 'get_authenticated_user_with_credentials_check' (or maybe something a bit less verbose) that wraps 'get_authenticated_user' with the extra check. Obviously, we would need to identify and update routes that could benefit from these new dependencies (which would be defined in dependencies.py). We would also need to update the test suite.
The text was updated successfully, but these errors were encountered: