diff --git a/src/index.ts b/src/index.ts index 8bc71d6..4dd94e0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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();