Skip to content
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

feat: add disable authentication option #310

Merged
merged 5 commits into from Nov 1, 2021
Merged

Conversation

rare-magma
Copy link
Contributor

@rare-magma rare-magma commented Oct 24, 2021

feat: Add disable authentication option

Adds a toggle option to disable the authentication by making the isAuthenticated function return true if the option is set in the UI and the user is already authenticated.
Solves #152 and #266

PR Checklist

  • I've started from master
  • I've only committed changes related to this PR
  • All Unit tests pass
  • I've removed all commented code
  • I've removed all unneeded console.log statements

@rare-magma
Copy link
Contributor Author

rare-magma commented Oct 24, 2021

btw I had difficulty in getting the app to build with the instructions in the README.
The libraries used in this app don't compile/run on node 16 so I had to install https://github.com/nvm-sh/nvm and run nvm install 15 && nvm use 15 before executting npm install

@WDaan
Copy link
Collaborator

WDaan commented Oct 26, 2021

Thanks for submitting this PR, I'll take a look at it as soon as I can!

I know the depencies might be a little outdated 😬😬
I also might have to upgrade to Vue3, but last time I checked Vuetify still didn't support it.

@rare-magma
Copy link
Contributor Author

hi,

I've thought about this PR for the past couple of days and I think it's not the correct approach to solve this problem.

In my opinion VueTorrent should check if it needs to authenticate before displaying the login page. For example, if you have set up bypass_local_auth or bypass_auth_subnet_whitelist_enabled, qbittorrent doesn't require authentication to access its API if you're within the scope of the bypass, so it doesn't make sense to serve a login page in these cases.

I'll try to come up with a different solution but it might take some time since I'm not familiar with Vue.

@rare-magma
Copy link
Contributor Author

I've updated the PR.
I've added a check if it's forbidden to access the /app/version API endpoint before serving the login page. This way VueTorrent avoids asking for login when it's not needed.

@WDaan
Copy link
Collaborator

WDaan commented Oct 31, 2021

Looks like a good solution!
I will try to test it out tomorrow 🙂
Thx for putting in the effort

@WDaan WDaan merged commit b069ce4 into VueTorrent:master Nov 1, 2021
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.

None yet

2 participants