Skip to content

chore: add dedicated GoToSocial auth flow#294

Open
ayr-ton wants to merge 1 commit into
discourse:mainfrom
ayr-ton:main
Open

chore: add dedicated GoToSocial auth flow#294
ayr-ton wants to merge 1 commit into
discourse:mainfrom
ayr-ton:main

Conversation

@ayr-ton

@ayr-ton ayr-ton commented Mar 18, 2026

Copy link
Copy Markdown

This implementation addresses the GoToSocial verification issue by creating a dedicated GoToSocial authentication class that avoids the problematic "Unauthorized" error handling while maintaining full OAuth compatibility.

Detailed Solution: Complete separation with dedicated auth class that:

  • Only checks nodeinfo endpoint for verification
  • No OAuth flow during initial verification
  • No "Unauthorized" error handling
  • Enables "Authorize" button after successful nodeinfo verification
  • Maintains full OAuth compatibility for actual authorization

Discussion:
https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245/8

@ayr-ton

ayr-ton commented Mar 18, 2026

Copy link
Copy Markdown
Author

Not so ruby savvy, does someone know a way of doing the same thing without errors.clear? 🥲

Comment thread lib/discourse_activity_pub/auth/mastodon.rb Outdated
Comment thread lib/discourse_activity_pub/auth/mastodon.rb Outdated
@ayr-ton ayr-ton changed the title fix: add redirect_uri for gotosocial chore: add dedicated GoToSocial auth flow Mar 29, 2026
@ayr-ton

ayr-ton commented Mar 29, 2026

Copy link
Copy Markdown
Author

@pmusaraj Ready for review, after some accumulated learning the second lap resulted in a better implementation (I think).
Didn't felt okay by just removing the button and decided to verify by checking https://#{domain}/.well-known/nodeinfo instead of booting the OAuth2 flow. Let me know what do you think :-)

@ayr-ton ayr-ton force-pushed the main branch 13 times, most recently from 2eb5ae7 to b66ab25 Compare March 29, 2026 07:08
@pmusaraj

pmusaraj commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Thanks @ayr-ton, I will review shortly. Do you have any test gotosocial instance I can use?

@ayr-ton

ayr-ton commented Apr 1, 2026

Copy link
Copy Markdown
Author

Thanks @ayr-ton, I will review shortly. Do you have any test gotosocial instance I can use?

You can use mine: https://ayr-ton.net

If you need a test user as well send me an email via ayrton at riseup.net so I can create one for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants