Home »
MCQs »
Koa.js MCQs
Which of the following methods is used to determine if a user is authenticated?
30. Which of the following methods is used to determine if a user is authenticated?
- session.isAuthenticated()
- ctx.isAuthenticated()
- app.isAuthenticated()
- obj.isAuthenticated()
Answer: B) ctx.isAuthenticated()
Explanation:
ctx.isAuthenticated() method is used to determine if a user is authenticated.