AuthSession headers

Is it possible to add additional headers to AuthSession? I need it to handle a JWT send by device on my callback route.

The Expo AuthSession API is intended for web authentication flows (e.g. OAuth 2 for browsers) and we don’t support custom headers right now. If you’re building a login screen for your own service, you probably want to use fetch and build the login screen yourself instead of using AuthSession.

The Expo AuthSession API has a client-side piece and a server-side piece (hosted by Expo so you don’t have to). The server-side piece sends back a small HTML page that records some information (client-side) and then redirects the browser to open your auth provider’s page (ex: the Google login page). Since browser redirects specify only a URL – and not HTTP headers – the browser won’t send any custom HTTP headers. Since this same constraint exists if you were running in the browser, I’d expect most OAuth 2 providers – particularly ones that are intended to work with websites – not to need custom HTTP headers.

If you wish you specify custom HTTP headers, we recommend that you implement your own authentication flow that’s built on top of the Expo WebBrowser API for the client-side part. For the server-side part you’d write your own server.

I’m having an issue with the redirecting uri, in standalone app it shows me a pago of expo saying that the page does not exist…

I know this is kinda old but anyway if someone also needs this, here it is :
A possible solution that I’ve used myself is to set as querystring your jwt token inside the url opened with openAuthSessionAsync on client-side and then to assign the authorization header to that query parameter on server-side then you could use whatever library you want to decode that token.