Skip to content

Commit

Permalink
fix: raising 403 error when no token found
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jan 29, 2021
1 parent 3f21828 commit 7aa3e78
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/appier_extras/parts/admin/models/oauth/oauth_token.py
Expand Up @@ -239,7 +239,12 @@ def reuse_s(cls, redirect_uri, scope, oauth_client, account = None, owner = None
def login(cls, access_token, rules = False):
oauth_token = cls.get_e(
access_token = access_token,
rules = rules
rules = rules,
raise_e = False
)
if not oauth_token: raise appier.SecurityError(
message = "OAuth token not found",
code = 403
)
oauth_token.touch_expired()
return oauth_token
Expand Down

0 comments on commit 7aa3e78

Please sign in to comment.