-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automated re-authentication #99
Comments
The proxy saves the OAuth 2.0 token after a successful authentication attempt, and you shouldn't be prompted again for this until the email provider requires re-authentication. There shouldn't be any link whatsoever to a computer restart, and this behaviour is the same regardless of whether you use the GUI or not. You mention testing – are you using the same IMAP/POP/SMTP password each time? The proxy's default behaviour is to re-authenticate when it is unable to decrypt the saved credentials due to an incorrect IMAP/POP/SMTP password. It may be worth setting |
Thanks for the info Simon! Setting the config value to false worked.
-Patrick
On Nov 23, 2022, at 02:40, Simon Robinson ***@***.***> wrote:
The proxy saves the OAuth 2.0 token<https://github.com/simonrob/email-oauth2-proxy/blob/7fe7a1453b7d874d5b15316af779823cad3afb00/emailproxy.py#L474> after a successful authentication attempt, and you shouldn't be prompted again for this until the email provider requires re-authentication. There shouldn't be any link whatsoever to a computer restart, and this behaviour is the same regardless of whether you use the GUI or not.
You mention testing – are you using the same IMAP/POP/SMTP password each time? The proxy's default behaviour is to re-authenticate when it is unable to decrypt the saved credentials due to an incorrect IMAP/POP/SMTP password. It may be worth setting delete_account_token_on_password_error = False at the end of the configuration file<https://github.com/simonrob/email-oauth2-proxy/blob/7fe7a1453b7d874d5b15316af779823cad3afb00/emailproxy.config#L178> to check whether this is the cause.
—
Reply to this email directly, view it on GitHub<#99 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALS6BUDQ2LOPEJ62LIPU4MTWJXC6JANCNFSM6AAAAAASIOKA5Q>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thanks for following up. To be clear: if changing this setting has resolved the issue, it means that somewhere in your setup you are trying to log in to the account with an incorrect password, so it might be worth looking into this. |
It's possible. I wasn't paying 10% attention to the password (it was saved on thunderbird email client). |
I believe this issue may have already been discussed (possibly issue #2 and in the README).
However, I'm not sure so i'm going to ask here.
Reading the documentation, it is clear that you have built the script to be able to start on user login and to use a non GUI mode for use in a server environment.
I am not clear on whether or not you have built the script to be able to automatically re-authenticate using the existing token after a restart (say a server crashes).
When i restart my computer to test, it correctly runs the script (in this case, it is running with the GUI), but when sending send/receive requests to the proxy, it forces an interactive reauthentication session.
It works great as long as the computer doesn't have to restart, but once I restart, it requires manually putting in my account password again.
Is this the expected behavior of the script or am I missing something?
Thanks for your help!
The text was updated successfully, but these errors were encountered: