Guide: OAuth - Pocket ID Setup

Hi - new here but wanted to share that OAuth using Pocket ID is working well with Web and Desktop apps.

Notes:

  • Seems there is a bug for OAuth in mobile apps not specific to Pocket ID due to the way Rocket.Chat mobile apps handle the browser.
  • Where I have used mydomain you should replace with your Pocket ID public URL.
  • This assumes you have Pocket ID already setup - it is not documented here - please follow instructions and look for help via: Introduction

Setup Steps:

In Pocket ID:

  1. Add OIDC Client
  2. Name: Rocket.Chat
  3. Client Launch URL: mydomain
  4. Callback URL set to https://mydomain/_oauth/pocketid
  5. PKCE disabled (enabled not tested as yet)
  6. Everything else default.
  7. Save (but keep a copy of Client ID and Client secret for Rocket.Chat config below.

In Rocket.Chat:

  1. Add Custom OAuth “Pocket ID”
  2. Enable: enabled
  3. URL: mydomain
  4. Token Path: /api/oidc/token
  5. Token Sent Via: Header
  6. Identity Token Sent Via: Same as “Token Sent Via”
  7. Identity Path: /api/oidc/userinfo
  8. Authorize Path: /authorize
  9. Scope: openid email profile groups
  10. Param Name for access token: access_token
  11. Id: “Client ID” from Pocket ID
  12. Secret: “Client secret” from Pocket ID
  13. Login Style: Redirect
  14. Button Text: Login with Pocket ID
  15. Key field: Username
  16. Username field: preferred_username
  17. Email field: email
  18. Name field: name
  19. Avatar field: picture
  20. Roles/Groups field name: groups
  21. Roles/Groups field for channel mapping: groups
  22. User Data Group Map: groups
  23. Merge Roles from SSO: enabled
  24. Roles to Sync: admin, member
  25. Merge users: enabled
  26. Show Button on Login Page: enabled

With this all setup and saved, test logging in with a test user - should all be working!

Thanks,
Shane.