mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-11-05 12:42:48 -05:00
- 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.
13 lines
398 B
Ruby
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
|