Skip to content

Commit 0420a42

Browse files
authored
Add organization_id parameter to authenticate_with_refresh_token (#296)
1 parent 324a28d commit 0420a42

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

workos/user_management.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,13 +780,15 @@ def authenticate_with_organization_selection(
780780
def authenticate_with_refresh_token(
781781
self,
782782
refresh_token,
783+
organization_id=None,
783784
ip_address=None,
784785
user_agent=None,
785786
):
786787
"""Authenticates a user with a refresh token.
787788
788789
Kwargs:
789790
refresh_token (str): The token associated to the user.
791+
organization_id (str): The organization to issue the new access token for. (Optional)
790792
ip_address (str): The IP address of the request from the user who is attempting to authenticate. (Optional)
791793
user_agent (str): The user agent of the request from the user who is attempting to authenticate. (Optional)
792794
@@ -805,6 +807,9 @@ def authenticate_with_refresh_token(
805807
"grant_type": "refresh_token",
806808
}
807809

810+
if organization_id:
811+
payload["organization_id"] = organization_id
812+
808813
if ip_address:
809814
payload["ip_address"] = ip_address
810815

0 commit comments

Comments
 (0)