I created a flask python app using Code Authorization method. It's a azure web app that runs beautifully when running directly from the browser.. But if I launch it from within Genesys, suddenly the session variables are not available to me.
I created functions (below) to set the tokens inside the sessions. the print statements are there for debugging out to the console. I see the token is set correcting .. but when I go to get the token.. it comes up as None.
This only happens when running the app from within Genesys.. Desktop, chrome, edge.. doesnt matter.
But running it outside of genesys, I can see the get statements are working..
def set_token(value):
session['value'] = value
print(f"this is the value in set_token {value}")
return
def get_token():
value = session.get('value')
print(f"this is the value in get_token {value}")
return value
I don't think your problem specifically has to do with Genesys Cloud, but to the fact that custom client apps/interaction Widgets integrations (webapps) are embedded in an iframe element in the Genesys Desktop.
Several browsers, like Chrome, are now enforcing security on management of cookies inside of an iframe.
I don't know if it is the source of your problem, and if the following would be enough for Flask, but I'd set my cookies to "secure" and to "SameSite=None".
Something like what's described in the this stackoverflow post.
You may also have to set "allow-same-origin,allow-scripts" in the IFrame Sandbox Options of your Client App integration (in Genesys Desktop - Admin - Integrations).