I’m creating a command-line application using Device Authorization Flow:
Here is the sequence:
- Authenticate my command-line application using sample command eg.
- Command Line Application will provide login link (verification_uri with user_code)
- Command Line Application polls for the access_token
- User logs in on auth0 using provided link
- User visits verification_uri with user_code then proceed to login link
- User failed to log in due to some problem (eg. lost internet connection)
- User visits again verification_uri with user_code then proceed to login link
Invalid or expired user code.
In the above scenario, the user cannot log in using the provided login link since the user code expired while the command line application is still polling for the access_token.
Is there a way the command line application determines user code has expired?