-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-745025: Error:OAuth access token expired after JWT Token expires #390
Comments
hey @sagar-raythatha , thanks for reaching out. |
@sfc-gh-aling Exception: It is the script which gets a token from Okta, and passing that token to Snowflake for authentication. While Okta stay connected for 20+ hours (based on application config in Okta) the access_token provided by the okta is valid for 60 mins. So after 60 mins of time if engine connection it gets expired and throws the exception above.
|
if this is still an unresolved issue, would it be possible to try adding authenticator="oauth",
..
client_session_keep_alive=True,
client_session_keep_alive_heartbeat_frequency=900 to the. connection options and see if it helps? which should send a keepalive to Snowflake every hour (by default) but with |
Please answer these questions before submitting your issue. Thanks!
pip freeze
)?Trying to connect via Engine and sessionmaker, it is expiring the token after 60 mins.
What did you expect to see?
There could be any one of two solutions should be present:
i. Specific exception, that we can catch this error and connect again with the refreshed token
ii. Support for SQL Alchemy event listener which might help us get the token every time it tries to connect
Can you set logging to DEBUG and collect the logs?
The text was updated successfully, but these errors were encountered: