Questions for React job interview

Explain the difference between request and response interceptors in Axios. How would you add a custom header to all Axios requests using interceptors? What is a JWT, and what are its three components? Explain the difference between signed and encrypted JWTs. How do you store JWTs on the client side? What are the trade-offs between localStorage and cookies? What measures can you take to prevent JWT from being tampered with? How can you prevent a JWT from being stolen (e.g., token hijacking)? What is JWT, and why is it used? What are the three parts of a JWT? Explain their purpose. How does JWT differ from session-based authentication? How can you include a JWT in the headers of an Axios request?

Apr 25, 2025 - 21:35
 0
Questions for React job interview

Explain the difference between request and response interceptors in Axios.
How would you add a custom header to all Axios requests using interceptors?
What is a JWT, and what are its three components?
Explain the difference between signed and encrypted JWTs.
How do you store JWTs on the client side? What are the trade-offs between localStorage and cookies?
What measures can you take to prevent JWT from being tampered with?
How can you prevent a JWT from being stolen (e.g., token hijacking)?
What is JWT, and why is it used?
What are the three parts of a JWT? Explain their purpose.
How does JWT differ from session-based authentication?
How can you include a JWT in the headers of an Axios request?