2

Have been posting around without success :

I am making a container app for iOS using Unity3d.

The user should login to GitHUB. Should access to a list of file (mostly image file type). download possible. Well so far…

I have made a github app, then I have the client_id and the client_secret. Making research I found this url works to request permission to user for your app :

url = “https://github.com/login/oauth/authorize?scrop=user:email&client_id=” + client_id

Well if you copy past the url with your client ID directly into the browser it will redirect you to your home page url with a form like this:

https://www.yourhomepage.com/?code=2ce706d933c922d7f22c

The code always change on each login or session.

Finally back to Unity, you can use a WWWForm, etc… with the following data to get receive the token :

url = https://github.com/login/oauth/access_token2
client_id = xxxx (from your app detail)
client_secret = xxxx (from your app detail)
code = xxxx (from the previous step.

The big question is how could the login could be done via wwwForm and it it exists. Then file request from a Private repository.

0

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.