loginWithNewScopes method
- List<
String> scopes, { - String? nonce,
KO: 추가 항목 동의 받기
동의 항목 ID 목록은 scopes
에 전달
EN: Request additional consent
Pass a list of the scope IDs to scopes
Implementation
Future<OAuthToken> loginWithNewScopes(List<String> scopes,
{String? nonce}) async {
String codeVerifier = AuthCodeClient.codeVerifier();
final redirectUri = kIsWeb
? CommonConstants.webAccountLoginRedirectUri
: KakaoSdk.redirectUri;
final authCode = await AuthCodeClient.instance.authorizeWithNewScopes(
redirectUri: redirectUri,
scopes: scopes,
codeVerifier: codeVerifier,
nonce: nonce,
webPopupLogin: true,
);
final token = await AuthApi.instance.issueAccessToken(
authCode: authCode,
codeVerifier: codeVerifier,
redirectUri: redirectUri,
);
await TokenManagerProvider.instance.manager.setToken(token);
return token;
}