From 66ec6e9a8da31f39ac0eed0227b7bd269404ff11 Mon Sep 17 00:00:00 2001 From: Hailey Date: Fri, 18 Jul 2025 00:10:05 -0700 Subject: [PATCH] add oauth metadata --- bskyweb/static/oauth-client-metadata.json | 19 +++++++++++++++++++ .../static/oauth-client-metadata.native.json | 19 +++++++++++++++++++ src/state/session/oauth.tsx | 10 +++++----- 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 bskyweb/static/oauth-client-metadata.json create mode 100644 bskyweb/static/oauth-client-metadata.native.json diff --git a/bskyweb/static/oauth-client-metadata.json b/bskyweb/static/oauth-client-metadata.json new file mode 100644 index 0000000000..7756f2f6f7 --- /dev/null +++ b/bskyweb/static/oauth-client-metadata.json @@ -0,0 +1,19 @@ +{ + "client_id": "https://bsky.hailey.at/oauth-client-metadata.json", + "client_name": "Bluesky (Hailey Demo)", + "client_uri": "https://bsky.hailey.at", + "redirect_uris": [ + "https://bsky.hailey.at/auth/callback" + ], + "scope": "atproto transition:generic", + "token_endpoint_auth_method": "none", + "response_types": [ + "code" + ], + "grant_types": [ + "authorization_code", + "refresh_token" + ], + "application_type": "web", + "dpop_bound_access_tokens": true +} diff --git a/bskyweb/static/oauth-client-metadata.native.json b/bskyweb/static/oauth-client-metadata.native.json new file mode 100644 index 0000000000..fd3ca49d39 --- /dev/null +++ b/bskyweb/static/oauth-client-metadata.native.json @@ -0,0 +1,19 @@ +{ + "client_id": "https://bsky.hailey.at/oauth-client-metadata.native.json", + "client_name": "Bluesky Native App (Hailey Demo)", + "client_uri": "https://bsky.hailey.at", + "redirect_uris": [ + "at.hailey.bsky:/auth/callback" + ], + "scope": "atproto transition:generic", + "token_endpoint_auth_method": "none", + "response_types": [ + "code" + ], + "grant_types": [ + "authorization_code", + "refresh_token" + ], + "application_type": "native", + "dpop_bound_access_tokens": true +} diff --git a/src/state/session/oauth.tsx b/src/state/session/oauth.tsx index 55435d76a4..6327bdb3bf 100644 --- a/src/state/session/oauth.tsx +++ b/src/state/session/oauth.tsx @@ -1,7 +1,7 @@ -import {ExpoOAuthClient} from 'expo-atproto-auth' -import {BrowserOAuthClient} from '@atproto/oauth-client-browser' -import {OAuthClient} from '@atproto/oauth-client' import {Platform} from 'react-native' +import {ExpoOAuthClient} from 'expo-atproto-auth' +import {type OAuthClient} from '@atproto/oauth-client' +import {BrowserOAuthClient} from '@atproto/oauth-client-browser' export const BSKY_OAUTH_CLIENT: OAuthClient = Platform.OS === 'web' ? createWebOAuthClient() : createNativeOAuthClient() @@ -29,8 +29,8 @@ export function createNativeOAuthClient() { clientMetadata: { client_id: 'https://bsky.hailey.at/oauth-client-metadata.native.json', client_name: 'Bluesky Native App (Hailey Demo)', - client_uri: 'https://hailey.at', - redirect_uris: ['at.hailey:/auth/callback'], + client_uri: 'https://bsky.hailey.at', + redirect_uris: ['at.hailey.bsky:/auth/callback'], scope: 'atproto transition:generic', token_endpoint_auth_method: 'none', response_types: ['code'],