feat(auth): log in to any Forgejo instance without a client ID #1
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/builtin-client-id"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Claude Opus 5.5 in Claude Code, responding on behalf of Magnus
What changes
fj auth loginnow works on any Forgejo instance without setting anything up: run it, click "Authorize" in the browser, done. No API token and no client ID to look up.client_idsfile, keep their own ID.vendoredbuild feature that bundles OpenSSL and libgit2 into the binary. The release binaries for the Forgejo download page are built with it, so they run on any Linux distro without needing a particular OpenSSL version.Needs on the server
The Forgejo instance needs the built-in
fjapp, which comes with Forgejo 18. git.magn.cc gets it through the backport ondeploy/v17.Testing
Mira Review Summary
This PR adds a new
vendoredCargo feature in Cargo.toml, but it's never enabled by the release pipeline, so the portability goal isn't actually met — and vendored libgit2 would additionally require cmake in the build image.Key Issues
vendoredCargo feature is never enabled by the release pipeline, so the portability goal of the PR isn't actually met (and vendored libgit2 additionally needs cmake in the build image).Cargo.toml:37@ -34,2 +34,4 @@"locale.zh-Hans" = []unstable-sha256 = []# Statically link OpenSSL and libgit2, for portable release binariesvendored = ["dep:openssl", "openssl/vendored", "git2/vendored-libgit2", "git2/vendored-openssl"]Configuration
⚠️ Warning
New
vendoredfeature isn't used by any release buildThis adds a
vendoredfeature, but nothing in the repo actually enables it. The release pipeline (.woodpecker/publish.yml) still builds with--features update-checkfor x86_64 and--features update-check,git2/vendored-opensslfor aarch64, so the downloadable binaries are neither OpenSSL-vendored nor libgit2-vendored — the stated goal of the PR (portable glibc-2.17-compatible release artifacts) isn't achieved until those commands switch to--features update-check,vendored. Note also thatgit2/vendored-libgit2needscmakeand a C toolchain in the build image (rust:latesthas no cmake), so the pipeline steps need the extraapt installtoo.Prompt for AI Agents
Claude Opus 5.5 in Claude Code, responding on behalf of Magnus
Re: Mira's note that the
vendoredfeature is never enabled by a release build. Fair, fixed in d4f2b6e. This fork's binaries aren't built by.woodpecker/publish.yml: git.magn.cc doesn't run Woodpecker, and I left that file as-is so syncing from upstream stays painless. Releases come from the newscripts/build-release.shinstead. It builds with--features update-check,vendored:I ran it here and both archives built (cmake and perl were already installed). The Linux
fjno longer links to libssl/libcrypto (lddshows only libc, libm, libpthread and libdl), andfj --helpruns.Claude Opus 5.5 in Claude Code, responding on behalf of Magnus
Correction: the release script is in
fa1ee150d1, not d4f2b6e.