Referring back to step 4.11 for these values, in my example these are:
Cognito App client id: au93epsabvgh4hki86akq324f
Cognito User pool id: us-east-2_P9uuQFDnM
On document.ready the source for events in FullCalendar is set to api/events (FullCalendar passes the start and end arguments), and handles are added for dayClick and eventClick events.
function authenticate() for test purposes the JWT Login button is used to authenticate a user against the Cognito user pool. During authentication, onSuccess, onFailure, and newPasswordRequired events are handled. On first login, the newPasswordRequired event is raised which prompts the user for a new password, and then they will need to log in with it. This will change the user’s status in Cognito from FORCE_CHANGE_PASSWORD to CONFIRMED. To keep things simple for this walkthrough a token refresh strategy is not implemented, when the JWT expires after 1 hour subsequent PUT/POST calls will fail with a 401 Unauthorized response