Files
growstuff/app/controllers/oauth_client_metadata_controller.rb
T
Brenda Wallace 78dd9625b8 Add Bluesky OAuth integration
- Implement Atproto::ClientConfig for managing OAuth client configuration.
- Create Atproto::Http module for handling HTTP requests with SSRF protection.
- Develop Atproto::Identity class to resolve handles to DIDs and validate DID documents.
- Introduce Atproto::Jws for generating and signing JWTs for OAuth.
- Create Atproto::OauthClient to manage the OAuth authorization flow with Bluesky.
- Add OmniAuth strategy for Bluesky sign-in, allowing users to authenticate using their Bluesky handle.
- Update views to include Bluesky sign-in options and handle connections.
- Modify routes to expose OAuth client metadata.
- Allow members to sign in without an email address when using Bluesky.
- Add tests for Bluesky authorization and sign-in processes.
2026-11-01 12:16:43 +13:00

13 lines
398 B
Ruby

# frozen_string_literal: true
# The document an AT Protocol authorization server fetches to learn who we are:
# its URL is our OAuth client_id.
class OauthClientMetadataController < ApplicationController
def show
return head :not_found unless Atproto::ClientConfig.enabled?
expires_in 1.hour, public: true
render json: Atproto::ClientConfig.new(request.base_url).metadata
end
end