Closed vijaykz closed 2 years ago
It's just a helper method that is used in other places as well like in holdings handler. On login, as you said session is not set so it will just return the client but you can use the same method in other places where you need the client with access token set.
In
login()
,get_kite_client()
is invoked first, which looks for"access_token" in session
. However,session["access_token"]
is initiated only later. Therefore, this check inget_kite_client()
is not effective.So, what is the purpose of
set_access_token()
?