-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Komoot synchronization is not working - secret (password) is encrypted multiple times #209
Comments
i i tried to setup the Komoot sync, i got the message: "failed to setup the strava intergration. " |
Hey there, Thank you for reporting and the PR @Kami. It turns out that pocketbase changed the way hooks handle the request. I censor the secrets before sending them back to the client to prevent double encryption. With the new hook setup, this did not work, and encrypted data got sent to the client, which in turn sent it to the server, leading to the problem described above. Nonetheless, I think it is a good idea to also prevent this on the server side, so I will have a look at #216 and merge it. |
Fixed in v0.16.1 |
Description
I tried to get the Komoot sync working but ran into persistent issues. I kept getting
Invalid credentials
, and occasionally enabling the integration would also fail with the same error.After adding some debug logs, I noticed that the Komoot secret (password) was being encrypted multiple times. This was causing the decryption to fail during sync / login.
The same issue likely also exists with other integration (Strava).
Quick Fix
As a temporary workaround, I added a simple check to detect if the secret already looks encrypted:
This gets applied here:
This does the trick (for now).
Notes
This isn't a proper fix - just a quick workaround to get sync working.
The root cause likely has to do with how the record is updated and when the secret gets re-encrypted. I'll dig into that in more detail when I get a chance.
I also have some other local changes (like an improved multi-stage Docker build, better debug logging, etc), which I'll try to clean up and PR separately.
Thanks
P.S. Thanks for starting and working on this project.
The text was updated successfully, but these errors were encountered: