0

This post sums up the majority of my question.

However, I am running my notebook inside a docker container. I also get a different error message. Connection Refused Error Photo

The port I am using is localhost:9270.

How can I get the authorization to redirect back to my container and notebook?

I have tried using the above post and I was expecting the redirect to return me to my jupyter notebook. The redirect always changes the port number though.

trimbljk
  • 86
  • 4
  • If I understand correctly, you are trying to authenticate your application at google using user credentials. Have you tried application password at google? It seems to me they have easier way of authentication for apps. – markalex Mar 12 '23 at 21:08
  • I apologize for any confusion. I have a jupyterlab server in a docker container and I'm trying to use OAuth to access my gmail account from a notebook on that lab server. – trimbljk Mar 12 '23 at 21:20
  • Will [this](https://blog.rebex.net/gmail-using-app-passwords) help? – markalex Mar 12 '23 at 21:29
  • I'd like to try it but is there a version for Python? I'm running Python in my jupyter notebook – trimbljk Mar 13 '23 at 01:38
  • 1
    It may differ depending which library you use. Read [this](https://stackoverflow.com/q/10258509/21363224), it may help you understand how app password work. But basically you ignore 2-step auth, and pass credentials programmatically. As I said before how it is done really depends on library, so you should reference documtation of your, to find exact steps. – markalex Mar 13 '23 at 06:50
  • Thanks. I'll try to give it a shot and get back to you – trimbljk Mar 13 '23 at 12:34
  • @markalex, with the help of your suggestion and some further reading, I was able to generate a better search phrase and found this thread: https://stackoverflow.com/questions/55635990/reading-gmail-email-in-python that answer what I needed. – trimbljk Mar 14 '23 at 02:24

0 Answers0