Skip to content

Commit

Permalink
Fix OAuth issues
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyabsk committed Nov 26, 2022
1 parent 087580e commit 83c0313
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pyrh/models/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ class ChallengeSchema(BaseSchema):
id = fields.UUID()
user = fields.UUID()
type = fields.Str(validate=CHALLENGE_TYPE_VAL)
alternate_type = fields.Str(validate=CHALLENGE_TYPE_VAL)
alternate_type = fields.Str(
validate=CHALLENGE_TYPE_VAL, required=False, allow_none=True
)
status = fields.Str(validate=validate.OneOf(["issued", "validated", "failed"]))
remaining_retries = fields.Int()
remaining_attempts = fields.Int()
Expand Down
4 changes: 2 additions & 2 deletions pyrh/models/sessionmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
EXPIRATION_TIME: int = 734000
"""Default expiration time for requests."""

TIMEOUT: int = 1
TIMEOUT: int = 3
"""Default timeout in seconds"""


Expand Down Expand Up @@ -102,7 +102,7 @@ def __init__(
self,
username: str,
password: str,
challenge_type: Optional[str] = "email",
challenge_type: Optional[str] = "sms",
headers: Optional[CaseInsensitiveDictType] = None,
proxies: Optional[Proxies] = None,
**kwargs: Any,
Expand Down

0 comments on commit 83c0313

Please sign in to comment.