KartikTalwar / Duolingo

Unofficial Duolingo API Written in Python
MIT License
822 stars 129 forks source link

Google Login unavailable #84

Closed nnickluna closed 4 years ago

nnickluna commented 4 years ago

API Doesn't work if Google login is used with Duolingo

igorskh commented 4 years ago

Can you give more information on what and how you are trying to do and what issue you are facing?

If you trying to use your Google login/password with this library it won't work, because OAuth is not implemented.

nnickluna commented 4 years ago

i made my Duolingo account using Google login and thus it doesn't work with my account

EricHier commented 2 years ago

Is there any solution to using a Duolingo account created using the Google Sign-In?

igorskh commented 2 years ago

You can authorize with Google Sign-In in a browser, then lookup JWT in Developer Tools under Network tab, and use it as a named argument jwt in the Duolingo class:

import duolingo
lingo  = duolingo.Duolingo('username', jwt='your_jwt_here')

I can't think of a straightforward method to authorize with Google account from Python script.

EricHier commented 1 year ago

Hi @igorskh :) do you have to get a new jwt now and then or does that jwt stay functioning forever?

igorskh commented 1 year ago

Hi @igorskh :) do you have to get a new jwt now and then or does that jwt stay functioning forever?

Hey @EricHier, technically Duolingo JWT does have an expiration date, but from what I see it's set to the year 2169, so practically it should not :) You can decode content of JWT with jwt.io and see it yourself. So not forever, but quite long, they might have some revoking mechanisms though, you might still need to get a new token sometimes.

adnanaga commented 1 year ago

Did anyone else get this to work ?