Only Allowing Authenticated Users to Answer a Question
Learn to prevent unauthorized users from answering a question.
We'll cover the following
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
We'll start by importing the authentication Hook in
@auth0/auth0-react
:
Get hands-on with 1200+ tech skills courses.