Device flow authentication #24352
-
I am following the instructions for Device Flow Authorization and I can’t get Step 3 to work (apps polls for authentication). After successfully entering the user_code at the login/device URL, I then POST to
Here is a gist of the python implementation that’s failing - the same client_id is being passed to both calls, and the docs don’t indicate that I need a client_secret. https://gist.github.com/kcranston/6edfebf177f82af6c6f6e1db92e9c722device-flow.py
This file has been truncated. show original
This is for a GitHub App, created by me and installed on my account. I feel like I am missing something basic here. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I tried the same in curl in my local and it all worked
Maybe the code has some sort of issue |
Beta Was this translation helpful? Give feedback.
-
You are right - this is working from the command line and was a problem with the code. Stupid syntax mistake - in the payload for Step 3, I had the key |
Beta Was this translation helpful? Give feedback.
You are right - this is working from the command line and was a problem with the code. Stupid syntax mistake - in the payload for Step 3, I had the key
"grant_type:"
with an extra colon inside the quotes. Sigh. Gist now updated.