I did pip uninstall JWT and pip uninstall PyJWT then finally pip install PyJWT. After that it imported the correct module and generated the token!
-> PyJWT 설치하면 ok
macOS Monterey introduced AirPlay Receiver running on port 5000. This prevents your web server from serving on port 5000. Receiver already has the port.
You can either:
turn off AirPlay Receiver, or;
run the server on a different port (normally best).
-> localhost:3000 이나 8000 등으로 하면 OK
->token = jwt.encode(payload, SECRET_KEY, algorithm='HS256').decode('utf-8') 에서 간단히 .decode('utf-8') 삭제하면 OK
Misspelling a keyword, e.g. Let or Class instead of let and class.
서버 문제
몰라