3rd Party Login
Antwohlf opened this issue · 5 comments
Is it possible to log in via a 3rd party provider with this API (Facebook or Google being examples)? I have been receiving "login failed" errors but verified the login works on the website.
As far as I know, it's not possible, what exactly are you trying to do? Simply submitting your Facebook/Google credentials won't work, the authentication has to take place in browser. After that you can use a JWT in this library.
Just to clarify, this should be as simple as
lingo = duolingo.Duolingo('username', jwt='token.from.browser')
correct?
I'm still getting
raise DuolingoException("Login failed")
duolingo.DuolingoException: Login failed
errors with the token from a logged in browser. I've also tried specifying password and session_file as None in the duolingo constructor with the same result.
@Antwohlf I'm afraid there is an issue with library implementation.
The URL in this line:
Line 142 in 9e552ba
has to be
return https://www.duolingo.com/users/%s" % self.usernameOtherwise it returns a HTTP 302 and redirects in which case authorisation fails.
Just to highlight for others, the difference here is there is a "www." in front of Duolingo.com vs just https://duolingo.com...