4

I have got both the password and code grant flows working with my Flask app, but it all feels a bit clunky.

I find the use of fetch_token and update_token in oauth.register to handle token timeout quite confusing, and I have found no examples of error handling. There is lots of clever implicit stuff going on, but the docs are dense, at least to me who is not too familiar with OAuth. Perhaps I'm not reading the docs the right way?

Just two details: I'm using fetch_access_token for the password grant, but this is not documented in the API under the Flask section, and fetch_token is apparently both a callback function and part of the API for some Clients but not others..

I could hash out each subject here I guess, question by question, but much better would be if somebody could point me to a more fleshed-out real-world example.

Any advice is welcome.

Alias_Knagg
  • 886
  • 1
  • 7
  • 21
  • fetch_access_token is not documented in Flask client because you shouldn't use it. You should always use `authorize_access_token` in framework integrations. I'll add a handling errors section in the documentation. – lepture Jun 08 '20 at 13:13
  • Thanks! I will try that. I guess I will post about fetch_token separately when I pick up this code next time. – Alias_Knagg Jun 12 '20 at 09:07