Skip to content

Commit

Permalink
Longer expiry for OAuth Grant Codes (5 min)
Browse files Browse the repository at this point in the history
These codes should not be long lived but 5 minutes seems like a reasonable upper bound. 

Most cases should be well under 15 seconds.
  • Loading branch information
Sumukh authored Sep 5, 2018
1 parent 2d94cc1 commit 7e8928e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/controllers/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def load_grant(client_id, code):

@oauth_provider.grantsetter
def save_grant(client_id, code, request, *args, **kwargs):
expires = dt.datetime.utcnow() + dt.timedelta(seconds=100)
expires = dt.datetime.utcnow() + dt.timedelta(seconds=300)
grant = Grant(
client_id=client_id,
code=code['code'],
Expand Down

0 comments on commit 7e8928e

Please sign in to comment.