Search⌘ K
AI Features

Only Allowing Authenticated Users to Answer a Question

Explore how to conditionally render answer submission forms by checking user authentication status with Auth0 in a React component. This lesson teaches you to secure user interactions with RESTful APIs by allowing only signed-in users to post answers.

Let's focus on the QuestionPage component now and only allow an answer to be submitted if the user is authenticated:

Steps to allow authenticated users to answer a question

...