Skip to content

Conversation

@coopbri
Copy link
Contributor

@coopbri coopbri commented Oct 6, 2025

Description

Review with: https://github.com/omnidotdev/hidra-app/pull/26

Task link: N/A
  • Set static OAuth client credentials matching IDP in development

Test Steps

  • Set the new environment variables in .env.local
  • Verify login works (Backfeed -> Sign In -> IDP -> authenticated in Backfeed)
  • Be happy: no more manual OAuth application setup during development in Omni OIDC RPs!

Copy link
Contributor

@hobbescodes hobbescodes left a comment

Choose a reason for hiding this comment

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

Sign in for me fails from the Backfeed app. Not positive on the full workflow that is supposed to happen with these changes, digging into better auth docs a bit here though to try and debug. I get an error Key (client_id)=(CZc...) is not present in table "oauth_application". regardless if I set skipConsent: true or not. If I set it to true it does attempt redirect to backfeed, but then I get a CallbackRouteError fron authjs. If I set it to false or leave it omitted as current code has it, then it fails before redirect (at the authorization screen).

Will continue to debug, but dropping the info here for reference!

@hobbescodes
Copy link
Contributor

Sign in for me fails from the Backfeed app. Not positive on the full workflow that is supposed to happen with these changes, digging into better auth docs a bit here though to try and debug. I get an error Key (client_id)=(CZc...) is not present in table "oauth_application". regardless if I set skipConsent: true or not. If I set it to true it does attempt redirect to backfeed, but then I get a CallbackRouteError fron authjs. If I set it to false or leave it omitted as current code has it, then it fails before redirect (at the authorization screen).

Will continue to debug, but dropping the info here for reference!

If I manually backfeed-app as an oauth-application in the IDP database locally, then flow works as expected. This though defeats the purpose of these PRs though I am assuming. Seems to be something with client registration when they are listed as a trusted client? Not positive when that occurs exactly within the request flow considering that docs say the trusted clients bypass database lookups. Is it expected that we must add the client(s) manually then still, and then after they are indeed in the database, flow works properly?

@hobbescodes
Copy link
Contributor

Sign in for me fails from the Backfeed app. Not positive on the full workflow that is supposed to happen with these changes, digging into better auth docs a bit here though to try and debug. I get an error Key (client_id)=(CZc...) is not present in table "oauth_application". regardless if I set skipConsent: true or not. If I set it to true it does attempt redirect to backfeed, but then I get a CallbackRouteError fron authjs. If I set it to false or leave it omitted as current code has it, then it fails before redirect (at the authorization screen).
Will continue to debug, but dropping the info here for reference!

If I manually backfeed-app as an oauth-application in the IDP database locally, then flow works as expected. This though defeats the purpose of these PRs though I am assuming. Seems to be something with client registration when they are listed as a trusted client? Not positive when that occurs exactly within the request flow considering that docs say the trusted clients bypass database lookups. Is it expected that we must add the client(s) manually then still, and then after they are indeed in the database, flow works properly?

See https://github.com/omnidotdev/hidra-app/pull/26#issuecomment-3372779130 for thoughts regarding registering clients.

@coopbri coopbri merged commit ac6d9b1 into master Oct 9, 2025
2 checks passed
@coopbri coopbri deleted the feature/static-oauth-config branch October 9, 2025 22:10
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.

3 participants