@@ -488,6 +488,7 @@ def authenticate_with_code(
488488 code_verifier : Optional [str ] = None ,
489489 ip_address : Optional [str ] = None ,
490490 user_agent : Optional [str ] = None ,
491+ invitation_token : Optional [str ] = None ,
491492 ) -> SyncOrAsync [AuthenticationResponse ]:
492493 """Authenticates an OAuth user or a user that is logging in through SSO.
493494
@@ -498,6 +499,7 @@ def authenticate_with_code(
498499 url as part of the PKCE flow. This parameter is required when the client secret is not present. (Optional)
499500 ip_address (str): The IP address of the request from the user who is attempting to authenticate. (Optional)
500501 user_agent (str): The user agent of the request from the user who is attempting to authenticate. (Optional)
502+ invitation_token (str): The token of an Invitation, if required. (Optional)
501503
502504 Returns:
503505 AuthenticationResponse: Authentication response from WorkOS.
@@ -1166,6 +1168,7 @@ def authenticate_with_code(
11661168 code_verifier : Optional [str ] = None ,
11671169 ip_address : Optional [str ] = None ,
11681170 user_agent : Optional [str ] = None ,
1171+ invitation_token : Optional [str ] = None ,
11691172 ) -> AuthKitAuthenticationResponse :
11701173 if (
11711174 session is not None
@@ -1181,6 +1184,7 @@ def authenticate_with_code(
11811184 "user_agent" : user_agent ,
11821185 "code_verifier" : code_verifier ,
11831186 "session" : session ,
1187+ "invitation_token" : invitation_token ,
11841188 }
11851189
11861190 return self ._authenticate_with (
@@ -1807,6 +1811,7 @@ async def authenticate_with_code(
18071811 code_verifier : Optional [str ] = None ,
18081812 ip_address : Optional [str ] = None ,
18091813 user_agent : Optional [str ] = None ,
1814+ invitation_token : Optional [str ] = None ,
18101815 ) -> AuthKitAuthenticationResponse :
18111816 if (
18121817 session is not None
@@ -1822,6 +1827,7 @@ async def authenticate_with_code(
18221827 "user_agent" : user_agent ,
18231828 "code_verifier" : code_verifier ,
18241829 "session" : session ,
1830+ "invitation_token" : invitation_token ,
18251831 }
18261832
18271833 return await self ._authenticate_with (
0 commit comments