Next Gen - User token?

I’ve also re-opened a ticket with our team. We think it’s some sort of race condition we need to handle.

Sounds good. Please let me know what is found.

@Kara - Any thoughts on when this will be completed?

Hi @IAmAKnacker

I have raised the priority level on the ticket and hope it can get picked up next week.

Hi @IAmAKnacker and all,

This a fix for this was pushed out a few days ago. There is also updated documentation here: Schema Access Methods

Please let me know if it is still not working for you, or if you would like any changes to the examples in the documentation.

Hi Kara,

I’ve tested it and it seems the token only appears on the initial login. As you navigate through pages the token doesn’t show up anymore. Is this expected behavior?

@IAmAKnacker Are you using the updated code example, and it’s still not working?

Knack.on('page:render', () => {
Knack.getUser().then(user => {
// Runs every time user navigates to a new page
})
})

Another update on the user.token - it is working as expected, except if the live app page is on a custom domain or an embedded page. In those cases, it will return null. We have a ticket open to fix this.