Testing functions with auth token extras

Options

When we run and debug a function stack, we are able to paste in the auth token to use for this run.

However the same is not true for a function.

How can we test our functions with authToken's without needing to run the function stack that references that function?

Reason why this would be necessary is that there might be some steps in the function stack that use elements of the authToken (eg: extras), and we want to focus on debugging just the function, not the entire function stack.

Are there any workarounds for this?

Thanks.

Comments

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    I would make the extras an input to the function, rather than trying to reference auth directly from the function. Then the API calls the function with the extras as parameter. This approach has better encapsulation, and gives you this testing optionality.

  • espptyltd
    Options

    That's a novel idea @Ray Deck.

    Thanks for your response.

    I do find it strange however that we can't use auth token's within the debug mode, even though at runtime the Function is able to process them.