handlers:
- url: /secure_api/.*
script: _go_app
login: required
auth_fail_action: unauthorized
This code only brings me to a page saying “Login required to view page.” Is there a way to instead redirect to my home page?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you specify
auth_fail_action: unauthorized, you get the page you are seeing (see here for the details). Changingunauthorizedtoredirectwill take them to the login screen, but if you want to do more granular handling of users based on their logged-in status, your best bet is to do it inside of your code via theUsersAPI. For instance (this is adapted from the docs), here is a simple example that would redirect a non-logged-in user to/: