Variable in Header Not Working

A GraphQL endpoint I need to hit requires a bearer token, and the admin only wants to distribute dynamic bearer tokens that expire after 1 hour. I'm trying to set up my GraphQL resource to hit the URL that provides bearer tokens and adds them to the auth header, but I can't seem set up a variable that will be read in the header value field. Are you able to read variables in the header fields? See pics for my approach (note that I'm just doing the "Define a variable" step and not the "API request" step to keep it simple)

![Screen Shot 2019-11-06 at 2.38.37 PM.png](https://retool-spectrum.imgix.net/threads/draft/5f2658ec-4c1e-4739-b921-5aa8c1bed553-Screen Shot 2019-11-06 at 2.38.37 PM.png)






Please ignore the first, broken screenshot

I tried following the instructions here but it didn’t work https://retool.com/docs/custom-api-authentication

UPDATE: it looks like variables are just plain broken

Hey @james-kelleher – thanks for reporting this. We are investigating!

Hey @james-kelleher can you confirm that you added the “Auth Login” button to the app you’re trying to use this with, and that you authed before checking those headers in the screenshot? Thanks!

Has this been fixed? I am getting the same issue variable undefined in the header

I don't think this is fixed.

Also having this issue. Also noticing that variable interpolation on a custom flow also doesn't work eg. Bearer {{ google1.accessToken }} just sends that raw string as a header

%USER_OAUTH2_ACCESS_TOKEN% syntax as documented in the following page also doesn't work.

https://docs.retool.com/docs/sso-generic-openid-provider#using-the-jwts-obtained-from-the-auth-flow-in-resources

Also see Unable to capture cookies received while authenticating a resource - #2 by chrisui

Context: Trying to use the default google sso and forward auth token via a header to backend api

Hi @chrisui !

Could you share how you have your OIDC SSO configured and also how your resource is set up to use the token?