Skip to content

Commit

Permalink
Merge pull request #50 from dimagi/nh/neverending_token
Browse files Browse the repository at this point in the history
Tokens do not expire
  • Loading branch information
kaapstorm authored Jul 11, 2024
2 parents dd99b51 + d860f89 commit 7eda682
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions hq_superset/oauth2_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ def save_token(token: dict, request: FlaskOAuth2Request) -> None:
client = request.client
client.revoke_tokens()

one_day = 24 * 60 * 60
token = OAuth2Token(
client_id=client.client_id,
token_type=token['token_type'],
access_token=token['access_token'],
scope=client.domain,
expires_in=one_day,
expires_in=0, # Token does not expire

This comment has been minimized.

Copy link
@mkangia

mkangia Jul 12, 2024

Contributor

@kaapstorm does this change apply for logins via web UI as well?
I wonder if we want that in long term?

This comment has been minimized.

Copy link
@kaapstorm

kaapstorm Jul 12, 2024

Author Contributor

Yeah, I think it does apply to web UI logins too.

I wonder too. I think longer term HQ will send the repeat records of a repeater one at a time, so that one repeater can't block the queue, or flood its remote API. And then token refresh won't be an issue.

)
db.session.add(token)
db.session.commit()
Expand Down

0 comments on commit 7eda682

Please sign in to comment.