You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you make a valid Device Access Token Request and do not grant/deny consent from the provided verification_uri_complete, then all polls of the token endpoint will indefinitely return authorization_pending.
If you have a client which will continue polling while receiving authorization_pending (rather than using expires_in), then the client will poll forever.
The reason for this is that authorization_pending is always returned if the user code is not invalidated (Line 150), irrespective of the age of the device code.
The only operation that will invalidate the user code is either granting/denying consent from the device verification consent page.
I believe that the check for the device code expiring (Line 173) should be moved before the check for user code invalidation.
If you make a valid Device Access Token Request and do not grant/deny consent from the provided
verification_uri_complete
, then all polls of the token endpoint will indefinitely returnauthorization_pending
.If you have a client which will continue polling while receiving
authorization_pending
(rather than usingexpires_in
), then the client will poll forever.The reason for this is that
authorization_pending
is always returned if the user code is not invalidated (Line 150), irrespective of the age of the device code.The only operation that will invalidate the user code is either granting/denying consent from the device verification consent page.
I believe that the check for the device code expiring (Line 173) should be moved before the check for user code invalidation.
The test
authenticateWhenDeviceCodeIsExpiredThenThrowOAuth2AuthenticationException
only passes because the user code is created in an invalidated state.The following update to the test demonstrates the failure.
This was previously raised in #1556, but that issue was closed as the feedback requested was not provided.
The text was updated successfully, but these errors were encountered: