ラッパーを通してトークンをセットするように

This commit is contained in:
rca 2024-07-17 09:28:27 +09:00
parent ef45ca2707
commit 6149843b84

View File

@ -45,8 +45,9 @@ const KidShiftAuthIntentHandler = {
const tokenResponse = await AuthService.login(loginCode);
if (tokenResponse) {
handlerInput.attributesManager.setPersistentAttributes(tokenResponse);
await handlerInput.attributesManager.savePersistentAttributes();
const attributeUtils = new AttributeUtils(handlerInput);
await attributeUtils.setToken(tokenResponse.accessToken);
await attributeUtils.saveAttributes();
return handlerInput.responseBuilder
.speak('Login successful')
.getResponse();