ashb commented on code in PR #47432:
URL: https://github.com/apache/airflow/pull/47432#discussion_r1991091347
##########
providers/fab/src/airflow/providers/fab/www/views.py:
##########
@@ -70,7 +69,8 @@ class FabIndexView(IndexView):
def index(self):
if g.user is not None and g.user.is_authenticated:
token = get_auth_manager().get_jwt_token(g.user)
- return redirect(f"{conf.get('api', 'base_url')}/?token={token}",
code=302)
+ url = f"{conf.get('api', 'base_url')}/"
+ return render_template("airflow/token_set.html", token=token,
redirect_url=url)
Review Comment:
I.e. something like this:
```python
@expose("/")
def index(self, response):
if g.user is not None and g.user.is_authenticated:
token = get_auth_manager().get_jwt_token(g.user)
response.set_cookie("_token", token)
return redirect(conf.get('api', 'base_url'), code=303)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]