Extract Auth ID from an input parameter

Answered

I have a public endpoint that needs to return some initial data, however, if the User is Auth'd (required to make make the booking) it needs to return the initial data with the additional data from the booking specific to the Auth ID.

I would like to pass the Auth token via an input and extract the Auth details within a certain part of the function stack. But it seems that the only way to extract Auth ID is to enable Authentication for the entire endpoint. Is there anyway to extract the Auth ID from the authentication token within a function if it is passed as an input rather than in the header?

4 replies