Question: Dynamically updating the auth headers
See original GitHub issueHello,
so far it was possible to update the auth header after instantiation. Since v7.1.0 the global config object is no longer used and
pusher.config.auth.headers.Authorization = 'Bearer <access-token>';
no longer works. Is it still possible to change the authOptions
after instantiation?
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Question: Dynamically updating the auth headers · Issue #18
Atm I've managed to update the Pusher object after the user has logged in, using something like: pusher.client.config.auth.headers.Authorization ...
Read more >How to dynamically set headers in Retrofit (Android)
A request Header can be updated dynamically using the @Header annotation. A corresponding parameter must be provided to the @Header.
Read more >Specifying a dynamic authorization header ... - Documentation
On the Configure Data Source Filters screen, enter the access token attribute name in the Authorization Header field. Example Authorization ...
Read more >How to dynamically set the Authenticate key in the http ...
We are implementing an integration using REST Api ,and in that we are having the same end point but different Authentication Keys for ......
Read more >[Res] How to set Authorization header value dynamically
We're about to add support for authentication. Once that is in, each of my REST requests needs to send an Authorization header where...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ivial98 customHandler takes two parameters. First one is your payload. And second one is a callback.
export declare type ChannelAuthorizationCallback = (error: Error | null, authData: ChannelAuthorizationData | null) => void;
Just you need to trigger callback with the response of your fetch result.
No need to return anything.
Not sure why Stalebot closed this… In any case, we have now released a new version of the library that supports two new functions -
headersProvider
andparamsProvider
- that allow you to retrieve the necessary header/param values at the time of the auth request instead of the current method of defining them at the time of instantiation.These functions are available in v7.6.0. I will leave this as closed as the fix has been released.