Closed SasLuca closed 8 months ago
Use dio Interceptors to add a token to each request
Thanks for the answer.
I thought of doing this though it seemed better to me to only send the tokens with requests that need it. Sometimes endpoints can also return different things based on whether there is or isn't an auth token but in my case that isn't a thing.
Will mark as closed for the moment.
How can we handle authorization for endpoints that require say a jwt token?
It seems like the generated functions don't allow us to specify custom headers. Is there a way to at least specify certain headers per endpoint?