Hello,
I have a main application written in Dash, at the moment I’m trying to implement routing where I could take a token and then perform the necessary operations with it,
Could you tell me how you can transfer a token to Dash applications?
Thank you
for examples:
# API routing
@app.server.route('/api/<token>', methods=['GET','POST'])
def generate_report(token):
db = Token()
check_access = db.get_list_tocken(token)
if check_access == 'denied':
return 'access denied'
You’d probably need to store the ‘code’ value on the back-end (e.g., database, file) and then retrieve it in the callback. Personally, I use flask-session, flask-redis, and Redis to store/retrieve session data for each user.