* chore: update copyright year in license headers
* Revert "chore: update copyright year in license headers"
This reverts commit 3e58129c431b9a491089ce36b908f9bb6ba38ed3.
* chore: update copyright year in license headers
* fix: sort go imports
* fix: add missing license headers
* feat(auth): implement oidc
* refactor(auth): centralize OIDC state cookie handling
* fix(web): resolve unused error variables in route handlers
* docs(readme): add OIDC authentication feature to list
* fix(auth): improve OIDC cookie handling for reverse proxy setups
The OIDC state cookie's Secure flag is now properly set when running behind a reverse proxy by checking both direct TLS and X-Forwarded-Proto header. This fixes authentication issues in common setups where:
- autobrr runs behind a reverse proxy that terminates HTTPS
- local development environments without TLS
- mixed protocol environments (internal HTTP, external HTTPS)
* fix: use crypt/random if argon2id fails
* feat(auth): show both login options when user exists in db
if user doesn't exist, e.g. canOnboard=true then we only show the OIDC button, since regular login makes no sense in that case
If user does not exist in db and the user wants to create a local user, OIDC needs to be disabled first
* feat(auth): improve OIDC provider initialization with discovery logging
* revert(issuer): do not remove trailing slash
* feat(auth): improve OIDC username resolution with additional claims
* fix(auth): handle OIDC issuer URLs with and without trailing slashes
When initializing the OIDC provider, automatically retry with/without trailing
slash if the first attempt fails.
- First attempts with original issuer URL
- If fails with trailing slash, retries without
- If fails without trailing slash, retries with
* feat(oidc): add gorilla sessions store for secure state management
Add gorilla sessions store to handle encrypted state cookies in OIDC flow,
while removing redundant session validation checks
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* fix(auth): prevent duplicate OIDC state cookies for authenticated sessions
Modify OIDC config handler to check for existing authenticated sessions
before setting state cookie. Still returns OIDC enabled status to maintain
UI state, but prevents unnecessary cookie creation for authenticated users.
* feat(oidc): use random secret for temporary state cookies
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* feat(auth): add rate limiting to OIDC endpoints
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* fix(auth): validate OIDC authorization code presence in callback
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* fix(auth): properly handle OIDC session errors
Improve error handling in OIDC login flow by properly handling cookie store
session errors. Return HTTP 500 if session cannot be retrieved instead of
silently continuing with potentially invalid state.
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* feat(auth): track and display authentication method for oidc and password logins
* fix: tests
* docs(readme): add environment variable section
* go mod tidy
* chore: log style and errors
---------
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
Co-authored-by: ze0s <ze0s@riseup.net>
* feat(backend): added change password api endpoint.
* feat(web): added profile UI to change password.
I think we can change the username too, but I don't know if we should for now disabled the username field.
* refactor: don't leak username or password.
* refactor: protect the route.
* generic
* feat: add ChangeUsername
* fix(tests): speculative fix for TestUserRepo_Update
* Revert "feat: add ChangeUsername"
This reverts commit d4c1645002883a278aa45dec3c8c19fa1cc75d9b.
* refactor into 1 endpoint that handles both
* feat: added option to change username as well. :pain:
* refactor: frontend
* refactor: function names in backend
I think this makes it more clear what their function is
* fix: change to 2 cols with separator
* refactor: update user
* fix: test db create user
---------
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
Co-authored-by: soup <soup@r4tio.dev>
Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
Co-authored-by: ze0s <ze0s@riseup.net>
* Started refactoring codebase for React 18.
* Migrated to react-router v6 fully
* Removed useless test setup along with relevant packages.
* Removed leftover console.log statement
* feat: use status forbidden for onboarding
* refactor(web): use react hook form on login
* fix: comply with r18 shenanigans
* chore: update packages
* feat: add ability to create an account via the webui without the need for autobrrctl
* refactor redundant code block.
* fix: early return and 0 value
* feat: improve config for http server
* Feature: Support multiple action status per release (#69)
* feat: move release actions to separate table
* chore: update sqlite driver
* fix(indexers): btn api client (#71)
What:
* Api key and torrentId in wrong order
* Set hardcoded ID in jsonrpc request object
* ParsetorrentId from url
Fixes#68
* feat: show irc network status in settings list
* feat: show irc channel status
* chore: go mod tidy
* feat: improve config for http server
* feat: add context to user repo
* feat: only set secure cookie if https