Hello,
I am new to bokeh and currently building an app that authenticates users and displays few bokeh plots post login. I did go through the https://github.com/bokeh/bokeh/tree/branch-3.0/examples/howto/server_auth toy example, but I am not exactly sure how the redirect to app.py is happening in that example (post login).
My application is using a directory structure so it has a main.py file. I am having difficulty in redirecting the user to the main application post successful login. The post method in LoginHandler is pretty simple and looks like this:
def post(self):
server_url = self.get_argument("url", "")
username = self.get_argument("username", "")
password = self.get_argument("password", "")
auth = self.check_permission(server_url, username, password)
if auth:
self.redirect("/")
else:
error_msg = "?error=" + tornado.escape.url_escape(self.failure_msg)
self.redirect(login_url + error_msg)
The check_permission() method validates the credentials and connects to an external API.