mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 18:16:15 +08:00
fix: enhance MCP token handling (#14483)
fix #14475 #### PR Dependency Tree * **PR #14483** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Enhanced MCP server token management with improved security—tokens now display only once with redaction support. * Updated token creation and deletion workflows with clearer UI state controls. * Added tooltip guidance when copying configuration with redacted tokens. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -24,7 +24,7 @@ export class AccessTokenService extends Service {
|
||||
isRevalidating$ = new LiveData(false);
|
||||
error$ = new LiveData<any>(null);
|
||||
|
||||
async generateUserAccessToken(name: string) {
|
||||
async generateUserAccessToken(name: string): Promise<AccessToken> {
|
||||
const accessToken =
|
||||
await this.accessTokenStore.generateUserAccessToken(name);
|
||||
this.accessTokens$.value = [
|
||||
@@ -33,6 +33,8 @@ export class AccessTokenService extends Service {
|
||||
];
|
||||
|
||||
await this.waitForRevalidation();
|
||||
|
||||
return accessToken as AccessToken;
|
||||
}
|
||||
|
||||
async revokeUserAccessToken(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user