添加token管理

This commit is contained in:
2025-10-31 16:06:54 +08:00
parent 59d04bb33c
commit 90c1e7ff6c
10 changed files with 299 additions and 5 deletions

View File

@@ -4,6 +4,7 @@
#import "AppleSignInManager.h"
#import <AuthenticationServices/AuthenticationServices.h>
#import <Masonry/Masonry.h>
#import "KBAuthManager.h"
@interface LoginViewController ()
//
@@ -147,6 +148,12 @@
if (code.length) info[@"authorizationCode"] = code;
}
// identityToken 访 token
NSString *accessToken = info[@"identityToken"];
NSString *uid = info[@"userIdentifier"]; //
if (accessToken.length > 0) {
[[KBAuthManager shared] saveAccessToken:accessToken refreshToken:nil expiryDate:nil userIdentifier:uid];
}
if (selfStrong.onLoginSuccess) selfStrong.onLoginSuccess(info);
}];
}