Skip to content

config: add options for OAuth functionality - #7635

Open
coanghel wants to merge 6 commits into
rclone:masterfrom
coanghel:master
Open

coanghel wants to merge 6 commits into
rclone:masterfrom
coanghel:master

Conversation

@coanghel

Copy link
Copy Markdown

What is the purpose of this change?

For Docker environments, need to bind to 0.0.0.0 instead of localhost
For rclone served by reverse proxy, should be able to override redirrect

Was the change discussed in an issue or in the forum before?

Fixes #7634

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

For Docker environments, need to bind to 0.0.0.0 instead of localhost
For rclone served by reverse proxy, should be able to override redirrect

Fixes rclone#7634
@ncw

ncw commented Feb 18, 2024

Copy link
Copy Markdown
Member

Can you drop the formatting changes from docs.md please? It's very difficult see what you changed!

Also why does this have a separate config for redirect URL? Will that be different to the bind address?

Thank you for taking a look at this.

@coanghel

Copy link
Copy Markdown
Author

Done, sorry about that I didn't even notice Prettier decided to hijack the markdown formatting. I added .vscode to the gitignore, I hope that's okay.

The bind address can (and necessarily will in Docker) be different in Docker deployments. For example, the bind address to listen to incoming OAuth callbacks in a Docker container will be 0.0.0.0:PORT however the redirect address that must be sent to the OAuth provider (e.g. Microsoft or Google or whatever) needs to be the public address that eventually is routed to that bind address.

Unfortunately, I noticed that various different remotes use different redirect URLs from the main oauthutil.go. Rather than update every single remote type to standardize what is used from oauthutil.go, it made more sense to allow the user to do a global override since the redirect URL will be managed by a reverse proxy anyway.

@coanghel

coanghel commented Mar 5, 2024

Copy link
Copy Markdown
Author

Hi @ncw , just following up if everything looks right now

@ncw

ncw commented Jan 14, 2025

Copy link
Copy Markdown
Member

Hi @coanghel sorry for the delay in merging this.

I'd like to merge for 1.70 - can you as a first step rebase it and fix the conflicts? I suggest you do that locally then force push the branch with a clean history.

@ncw ncw added this to the v1.70 milestone Jan 14, 2025
@coanghel

Copy link
Copy Markdown
Author

@ncw this may have been done correctly... but I'm not sure.

@ncw ncw modified the milestones: v1.70, v1.71 Jun 19, 2025
@ncw ncw modified the milestones: v1.71, v1.72 Sep 4, 2025
@ncw ncw modified the milestones: v1.72, v1.73 Nov 24, 2025
@ncw ncw modified the milestones: v1.73, v1.74 Feb 17, 2026
@ncw ncw modified the milestones: v1.74, v1.75 May 5, 2026
@ncw ncw modified the milestones: v1.75, v1.76, v1.77 Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OAuth 2.0 Compatibility for Docker / Headless Runtimes

2 participants