setToken method
- @override
- OAuthToken token
override
KO: 리다이렉트 방식 로그인으로 서비스 서버에서 발급받은 토큰을 TokenManager
에 토큰 할당
EN: Set tokens in the TokenManager
that are issued in the service server using Login through redirection
Implementation
@override
Future<void> setToken(OAuthToken token) async {
_encryptor ??= await AESCipher.create();
_preferences ??= await SharedPreferences.getInstance();
_preferences!.setString(versionKey, KakaoSdk.sdkVersion);
await _preferences!
.setString(tokenKey, _encryptor!.encrypt(jsonEncode(token)));
_currentToken = token;
}