fix
This commit is contained in:
@@ -221,19 +221,25 @@ function App() {
|
||||
const oauthResult = await atprotoOAuthService.checkSession();
|
||||
|
||||
if (oauthResult) {
|
||||
console.log('OAuth result found:', oauthResult);
|
||||
|
||||
// Ensure handle is not DID
|
||||
const handle = oauthResult.handle !== oauthResult.did ? oauthResult.handle : oauthResult.handle;
|
||||
console.log('Processed handle:', handle);
|
||||
|
||||
// Check if handle is allowed
|
||||
if (appConfig.allowedHandles.length > 0 && !appConfig.allowedHandles.includes(handle)) {
|
||||
console.log('Handle not allowed:', handle, 'Allowed:', appConfig.allowedHandles);
|
||||
// Handle not in allowed list
|
||||
setError(`Access denied: ${handle} is not authorized for this application.`);
|
||||
setIsLoading(false);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Getting user profile for:', oauthResult.did, handle);
|
||||
// Get user profile including avatar
|
||||
const userProfile = await getUserProfile(oauthResult.did, handle);
|
||||
console.log('User profile received:', userProfile);
|
||||
setUser(userProfile);
|
||||
|
||||
// Load all comments for display (this will be the default view)
|
||||
|
Reference in New Issue
Block a user