-
Notifications
You must be signed in to change notification settings - Fork 71
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update onedrive-authorize #40
Conversation
one drive for personal does not need client secret params
@@ -9,7 +9,7 @@ echo "https://login.live.com/oauth20_authorize.srf?client_id=${api_client_id}&sc | |||
echo "" | |||
echo "When ready, please enter the value of the code parameter (from the URL of the blank page) and press return" | |||
read code | |||
api_json_result=$(curl -s -d "client_id=${api_client_id}&client_secret=${api_client_secret}&code=${code}&grant_type=authorization_code&redirect_uri=https://login.live.com/oauth20_desktop.srf" -X POST "${api_auth_url}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the official documentation, the parameter client_secret
is required: https://dev.onedrive.com/auth/msa_oauth.htm#step-2-redeem-the-code-for-access-tokens
Even though it works without providing the secret, I would leave it there until Microsoft changes the documentation.
This patch seems to be required now. The current master does not work. |
I agree with @weismat, this patch works to me to authorize. |
Microsoft has two types of applications: The master branch supports only the Live SDK applications for OneDrive Personal. You have to make sure, that your App ID contains no dashes. If it does, you most likely have created a converged application. If you have created a converged application and try to authorize your app with the script from the master branch, you receive the error |
After some more testing I will merge the feature branch into the master. That means no more support for the old (deprecated?) Live SDK application, but allows the script to use the new Graph API from Microsoft. |
one drive for personal does not need client secret params