mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:53:00 +03:00
🚀 Feature: Manually set Client ID and Client Secret #438
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @varialflip on GitHub.
Feature description
Editing the Client ID and Secret
Pitch
I'm currently trying to setup Pocket ID as my IDP for OwnCloud. However it requires a hard coded Client ID and Secret to use the mobile and desktop clients.
@stonith404 commented on GitHub:
Yeah the docs are indeed a bit confusing. As far as I understand you either have to use the hard-coded client ID and secret or hard-code the credentials provided by Pocket ID into the source code of the OwnCloud clients and rebuild the app:
If you choose to use a hard-coded client secret, it inherently becomes insecure since the secret is no longer private. For this reason, I’ve decided not to implement the ability to set your own client ID and secret directly.
That said, if you still want to proceed with this insecure approach, you can manually update the client ID and secret in the database with the following commands:
Here’s how to replace the placeholders:
owncloud-client-idwith the desired client ID.owncloud-client-secret-bcrypt-hashedwith the bcrypt-hashed version of the client secret you want to use. To generate this hash, visit https://bcrypt-generator.com/, input your client secret, and use the resulting hash.current-client-idwith the client ID of the existing client you want to update.@etho201 commented on GitHub:
Thank you @stonith404 for providing details on how to work around the issue. As I implemented this in my own setup, I documented the steps I took: https://github.com/etho201/docker-pi-stacks/blob/master/dev/pocket-id/owncloud.md
@varialflip commented on GitHub:
Owncloud docs have been hard for me to understand.
Here’s the relevant information:
https://doc.owncloud.com/server/next/admin_manual/configuration/user/oidc/oidc.html#client-ids-secrets-and-redirect-uris
This applies to Owncloud server (not ocis) but I believe the clients are the same.
@stonith404 commented on GitHub:
Are you sure that you have to set the client ID and client secret manually? Can you share where you've read that?