The only changed I need was in the method 'get_current_user' I added an if...else that return 'None' if the user is not logged in, than I added 'get_current_user' for all endpoints and works for all user authenticated or not.