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
Go to http://localhost:9000/activate, paste the user code again and submit. You will see error message, internal server error is returned.
This is because there is an NPE in OAuth2DeviceVerificationAuthenticationProvider. OAuth2DeviceVerificationAuthenticationProvider assumes that SCOPE attribute will not be null when user verifies the device but SCOPE attribute is removed during the first verification.
This NPE can be probably fixed by checking early whether the user code has been previously invalidated.
Describe the bug
[Device Code Grant] Submitting the same user code more than once results in internal server error cause by NPE
To Reproduce
activate
and copy the user codeThis is because there is an NPE in
OAuth2DeviceVerificationAuthenticationProvider
.OAuth2DeviceVerificationAuthenticationProvider
assumes thatSCOPE
attribute will not be null when user verifies the device butSCOPE
attribute is removed during the first verification.This NPE can be probably fixed by checking early whether the user code has been previously invalidated.
Expected behavior
RFC does not mandate what should happen in this situation but I believe 4xx error would be more appropriate
The text was updated successfully, but these errors were encountered: