wildebeest icon indicating copy to clipboard operation
wildebeest copied to clipboard

Fix missing /api/v1/apps/verify_credentials endpoint

Open DataDrivenMD opened this issue 2 years ago • 4 comments

[X] Fixes https://github.com/cloudflare/wildebeest/issues/253 [X] Implements validation logic for POST /api/v1/apps [X] Expands test suite for POST /api/v1/apps and GET /api/v1/apps/verify_credentials endpoints

DataDrivenMD avatar Feb 10 '23 23:02 DataDrivenMD

After further testing, I think this PR merits a clarification: this isn't meant to fix all 3rd-party app incompatibilities, just those that invoke GET /api/v1/apps/verify_credentials during their onboarding process. I'm currently working on a separate fix that I hope will fix https://github.com/cloudflare/wildebeest/issues/35

DataDrivenMD avatar Feb 11 '23 18:02 DataDrivenMD

@DataDrivenMD I tried merging this to my wildebeest instance and I couldn't get it to work on elk.zone. It just spit out json still. Is there anything else you did?

jahanson avatar Feb 11 '23 19:02 jahanson

I'm seeing the same thing. Turns out that there's another (separate) Mastodon API incompatibility issue that prevents Elk and Ivory from completing the OAuth flow. I'm working on a fix to that one now, but it's a little more involved because it requires updating type definitions for MastodonAccount and CredentialAccount. It also involves writing SQL queries to retrieve actual values for several attributes. At the moment, many of the required attributes are hard-coded as static values, which seems to break OAuth flow for anything other than the official Mastodon iOS App even after the patch in this PR is applied.

IOW: this patch fixes some, but not all 3rd-party app integrations, but figuring out which ones is like playing a game of whack-a-mole

DataDrivenMD avatar Feb 11 '23 19:02 DataDrivenMD

Is my understanding correct that Elk and Ivory are more deeply incompatible with Wildebeest because of their ID UUID vs Integer issue? I can take a look at removing the hardcoded values in the Oauth flow

xtuc avatar Feb 15 '23 09:02 xtuc

Is my understanding correct that Elk and Ivory are more deeply incompatible with Wildebeest because of their ID UUID vs Integer issue? I can take a look at removing the hardcoded values in the Oauth flow

@xtuc Sorry for the delayed response. That's the primary incompatibility with Ivory based on my DMs with the Ivory team. Also, made the changes you requested to this PR (after updating from main) and should be ready for a re-review at your convenience.

I tried merging this to my wildebeest instance and I couldn't get it to work on elk.zone. It just spit out json still. Is there anything else you did?

@jahanson Elk had another issue going on, which has since been fixed- I'm able to log into my Wildebeest instance from my Elk instance, and you're welcome to try logging into your Wildebeest instance from my Elk instance to try to narrow down the source of the problem, if you'd like.

DataDrivenMD avatar Feb 21 '23 21:02 DataDrivenMD

Sorry, @xtuc not sure why the linting is still failing PR checks. Would appreciate your help getting past this roadblock.

DataDrivenMD avatar Feb 21 '23 22:02 DataDrivenMD

@DataDrivenMD I can't update your branch directly (I believe the allow edits from maintainers option isn't checked) but here's a commit to fix linting and tests: https://github.com/cloudflare/wildebeest/commit/c44d552d080dd4e633efcfe7c4e48d9e427f1f67

xtuc avatar Feb 22 '23 10:02 xtuc

Seems like I have to upgrade my organization plan to enable that option. Will look into it. In any case, I manually applied your commit (thank you!) and that seems to have done the trick thanks for your help.

DataDrivenMD avatar Feb 24 '23 01:02 DataDrivenMD