Custom refresh response token pointer
Describe the feature
Hi,
I'm using the module in local mode pointing to an external api (to which I don't have access and cannot edit).
During sign in the token comes in bearerToken property:
{
...
"bearerToken": "my-token",
}
But during refresh the token comes in accessToken property:
{
...
"accessToken": "my-token",
}
In the configuration I set signInResponseTokenPointer to /bearerToken who works like a charm during SignIn but returns an error during refresh:
This happens because the module uses signInResponseTokenPointer to retrieve the token also during the refresh call.
What I need is a configuration property like refreshResponseTokenPointer to allow the token to be handled correctly when provided in different properties between calls.
Thanks
Provider
- [ ] AuthJS
- [X] Local
- [ ] Refresh
- [ ] New Provider
Hi @Rizzato95 , thanks for your request. As we're a bit busy at the moment with higher priority issues, would you give it a try yourself? We would be able to quickly review your PR
Same problem here. I'm coming from version 0.7.2, where there was that option. I've also opened an issue #635 and it was fixed #727.
Same problem here. I'm coming from version 0.7.2, where there was that option. I've also opened an issue #635 and it was fixed #727.
I think we're not talking about the same problem. You asked for an option in the refresh request (which is now present as you correctly say), I need it in the refresh response.
I created a PR (#910) for this new option.
@Rizzato95 ops π . Youβre right, my bad.
Closing as done in #910