AppFlowy/frontend/appflowy_flutter/lib/shared/af_user_profile_extension.dart
Lucas 3ae6888fee
feat: invite member by link (#7780)
* feat: invite member by link

* feat: add invite by link section

* feat: integrate invite by link and copy invite link

* feat: integrate invite link apis

* feat: add reset link dialog

* feat: support redirect to admin panel

* fix: flutter analyze

* feat: remove expire time

* fix: apply correct color in dark mode

* fix: flutter analyze

* chore: disable theme hotkey test
2025-04-22 09:58:13 +08:00

17 lines
440 B
Dart

import 'dart:convert';
import 'package:appflowy_backend/log.dart';
import 'package:appflowy_backend/protobuf/flowy-user/user_profile.pb.dart';
extension UserProfilePBExtension on UserProfilePB {
String? get authToken {
try {
final map = jsonDecode(token) as Map<String, dynamic>;
return map['access_token'] as String?;
} catch (e) {
Log.error('Failed to decode auth token: $e');
return null;
}
}
}