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

Reolink only-token client added #1614

Merged
merged 2 commits into from
Oct 19, 2024

Conversation

apocaliss92
Copy link
Contributor

No description provided.

@@ -89,8 +89,12 @@ export class ReolinkCameraClient {
await this.login();
const url = options.url as URL;
const params = url.searchParams;
for (const [k, v] of Object.entries(this.parameters)) {
params.set(k, v);
if(this.forceToken) {
Copy link
Owner

@koush koush Oct 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is not necessary. the purpose of parameters it to return parameters needed for auth. why manually parsing them out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, some calls fail if providing both token and user/pass, but if forceToken is set they will never be set

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would both token and username pass be set?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case it's not possible, it was something from the previous branch

@koush koush merged commit 531a9d2 into koush:main Oct 19, 2024
@apocaliss92 apocaliss92 deleted the reolink-force-token-client branch October 20, 2024 10:39
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.

2 participants