New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get device code authentication to work #87
Comments
I must've broken something because this code (which definitely worked for me at least once), no longer works: library(httr2)
client <- oauth_client(
id = "Iv1.73a8cd0fc360044f",
secret = obfuscated("G8mAhZD5SVZKf0dEkrTA33xf6ImWrhIfTrRuZzb9JxH87ec8LglCilQGdbonyS1f6oI-ytqxOCk"),
token_url = "https://github.com/login/oauth/access_token",
name = "github_app"
)
token <- oauth_flow_device(client, auth_url = "https://github.com/login/device/code") |
Cool, so I'm not going crazy then! |
I can confirm the same error too. It looks like it's because oauth_flow_device_request calls oauth_flow_fetch, which looks for access_token in the response, but of course the device flow only returns verification_uri_complete, not the actual token. Lines 82 to 89 in 87011c0
Lines 15 to 22 in 87011c0
|
It seems like this works once more, possibly due to #109 Reprex with new Github app created just for this issue: library(httr2)
client <- oauth_client(
id = "c17ad0b8bb2696ee57ab",
secret = obfuscated("mI4VaghA52WQWeKGDOxqZ_v4sEDuJgRNS0gqSN8irsi8OShWELpfaa13E8ogiQFsZnmXJ80dg6I"),
token_url = "https://github.com/login/oauth/access_token",
name = "https://httr2.r-lib.org"
)
token <- oauth_flow_device(client, auth_url = "https://github.com/login/device/code") |
I always leave stacks of issues the first time I use a package, it's nothing personal 馃榿
I can't seem to get the device code flow to work with Azure. I can authenticate with the authorization code flow, and with the device code flow using my existing AzureAuth code, so I know there's nothing wrong on the AAD side.
Is there something wrong in how I'm calling
oauth_flow_device
?The text was updated successfully, but these errors were encountered: