Blueprint redirect with sanic jwt

Hi guys,

I’m trying to do a redirect as a response from a protected route and to a protected route.

I am using Sanic-JWT with a blueprint group like so:

image

I add this blueprint group to my app right before I initialize sanic-jwt

I am then trying to use url_for to do a redirect as a response for a create_tournament request for example:

image

This is my get_tournaments route:
image

However this redirect keeps on returning a 401 with “Authorization header not present.” on our react-native application. This redirect is calling the blueprint defined within the same file, I am also trying this from other blueprint files to redirect to a blueprint and a handler within a different file.

My question is how do I redirect with authentication?

Thanks

The request is controlled by the client. When the server returns the “redirect”, it is just a suggestion. If it’s up to the client to decide what to do. The client needs to send the second request with the authentication details.