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

Included SimpleAPI - Can not authenticate directly in URL #283

Open
AndreasHD23 opened this issue Jan 30, 2023 · 0 comments
Open

Included SimpleAPI - Can not authenticate directly in URL #283

AndreasHD23 opened this issue Jan 30, 2023 · 0 comments

Comments

@AndreasHD23
Copy link

Describe the bug
When authentication and (included) Simple-API is enabled one can not authenticate with URL parameters.
It brings you to /login/index.html instead.

To Reproduce
Steps to reproduce the behavior:

  1. Enable Authentication
  2. Enable Simple-API
  3. call URL https://iobrokerIP:8082/getPlainValue/0_userdata.0.my.Data?user=username&pass=Password123
  4. Instead of returning value it redirects to /login/index.html
  5. After manual authentication one call call https://iobrokerIP:8082/getPlainValue/0_userdata.0.my.Data and it returns the value (so API itself is working).

Expected behavior
Authentication via URL parameters and returning value.

Screenshots & Logfiles
If applicable, add screenshots and logfiles to help explain your problem.

Versions:

  • Adapter version: 4.3.0
  • JS-Controller version: 4.0.24
  • Node version: 16.19.0
  • Operating system: Ubuntu 22.04

Additional context
If this is expected behavior it pretty much renders authenticated api calls useless, as it always requires user input.
BASIC authentication (with sending headers) is not an option as this would be a global setting for other uses of the adapter as well.

Is there any other way to authenticate when using the included Simple-API? Couldn't find that anywhere.

Using the standalono Simple-API adapter is a workaround which works fine.
But since I read (on this repository somewhere) that the code for the standalone API adapter and the API included in the WEB-adapter is the same, I was surprised to find authentication not working.

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

No branches or pull requests

1 participant