Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom refresh response token pointer #895

Closed
1 of 4 tasks
Rizzato95 opened this issue Sep 2, 2024 · 5 comments
Closed
1 of 4 tasks

Custom refresh response token pointer #895

Rizzato95 opened this issue Sep 2, 2024 · 5 comments
Labels
enhancement An improvement that needs to be added p3 Minor issue

Comments

@Rizzato95
Copy link
Contributor

Rizzato95 commented Sep 2, 2024

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:

image

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
  • Local
  • Refresh
  • New Provider
@Rizzato95 Rizzato95 added enhancement An improvement that needs to be added pending An issue waiting for triage labels Sep 2, 2024
@phoenix-ru phoenix-ru added p3 Minor issue and removed pending An issue waiting for triage labels Sep 12, 2024
@phoenix-ru
Copy link
Collaborator

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

@N1K1TAS95
Copy link

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.

@Rizzato95
Copy link
Contributor Author

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.

@N1K1TAS95
Copy link

@Rizzato95 ops 😅. You’re right, my bad.

@phoenix-ru
Copy link
Collaborator

Closing as done in #910

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement that needs to be added p3 Minor issue
Projects
None yet
Development

No branches or pull requests

3 participants