luzhanov / anki-adder-plus

"Anki Adder" Chrome plugin
38 stars 4 forks source link

Couldn't log onto AnkiWeb. #7

Open yosevu opened 7 years ago

yosevu commented 7 years ago

Hello,

I'm trying to setup, but my email/password won't save. I have double-checked and verified they work signing into ankiweb.net. Is there something I am missing?

Thanks!

vvscode commented 7 years ago

@luzhanov login request body doesn't contain csrf_token ( I just compare request on ankiweb and from addon )

Suppose that before $.post for login we should make get request and parse CSRF token from response

is PR welcome?

vvscode commented 7 years ago

https://github.com/luzhanov/anki-adder-plus/pull/8

ninja33 commented 7 years ago

Beside login, csrf_token was also requested while saving. But it doesn't work even you add csrf_token. Your account will be suspended 24 hours if you do so.

You may check last 2 commits of my chrome extension "Anki-dict-helper". I have to disable ankiweb interface to avoid my users account to be disabled.

Let me know if you have any progress.

vvscode commented 7 years ago

@ninja33 doesn't problem solved via getting csrf_token for each request?

luzhanov commented 7 years ago

I already tried to do this and my account was suspended for 24h. Now I'm rewriting the plugin to use local saving with exporting to CSV or APKG files

vvscode commented 7 years ago

@luzhanov @ninja33 I see that both of you use UI api instead of sync api from ankiweb. Is there any thoughts about it?

luzhanov commented 7 years ago

@vvscode you're right, it was web API. Anyway I think we can't rely on reverse engineered API cause it can be blocked at any moment :( Also it can lead an addon users to a blocking (even permanent) on the Anki website, so I propose to focus our effort on the development of a local-saving version of addon.

ninja33 commented 7 years ago

For instant card saving, you may have another option by using a very useful anki addon anki connect. It opened a JSON like interface to communicate with browser locally.

The only problem is that you have to keep anki desktop app opened.

vvscode commented 7 years ago

@luzhanov I suppose that probability of closing sync api is veeeery small - it used by desktop application

luzhanov commented 7 years ago

@ninja33 this plugin is good, and I'll think about using this connection, but I think that from user experience it's too complex to save in this way. I mean that for using it you need:

  1. Setup local Anki (some users can't do this to the company policy)
  2. Setup local Anki addon
  3. Setup chrome plugin
  4. Configure connection between them

The more steps we have the less people will use it :( But I think that this can be added to the plugin late as an option.

yosevu commented 7 years ago

@luzhanov +1 for the connect option. I don't think something similar to the Yomichan flow is too complicated for users who already have/use Anki desktop to add Anki connect plugin then connect to the chrome extension.

Out of beginner's curiosity, why isn't it possible (or a bad idea) to fill and submit the form to add a card by triggering buttons instead sending requests?