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

feat: token endpoint #2062

Closed
wants to merge 2 commits into from
Closed

feat: token endpoint #2062

wants to merge 2 commits into from

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented May 25, 2021

EXPERIMENTAL

Reasoning 💡

A new take on #951

Checklist 🧢

  • Documentation
  • Tests
  • Ready to be merged

Affected issues 🎟

@vercel
Copy link

vercel bot commented May 25, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nextauthjs/next-auth/HfNWAfLFhY367LFszPzfBn1CBbqS
✅ Preview: https://next-auth-git-feat-token-endpoint-nextauthjs.vercel.app

@balazsorban44 balazsorban44 changed the title Feat/token endpoint feat: token endpoint May 25, 2021
@github-actions github-actions bot added core Refers to `@auth/core` TypeScript Issues relating to TypeScript labels May 25, 2021
@balazsorban44
Copy link
Member Author

OK, so the main issue here is if an access_token expires and let's say we start the token renewal by contacting the provider's /token endpoint, how do we make sure that subsequent requests under the renewal period does not cause a problem? It is especially hard, if the refresh_token is sliding (only usable once.).

My idea is that we need some kind of caching in the front-end that de-duplicates requests to this new /api/auth/token endpoint and rather subscribes to the result.

@balazsorban44
Copy link
Member Author

Sorry for those who are eagerly waiting for this, and only see me keep closing it... My hunch about this PR fixing some problems wasn't right, so I have to close this again, as I prioritize other work for now. Could be an addition later in [email protected]. This is a new endpoint, so hopefully, it can be added in a non-breaking manner.

@balazsorban44 balazsorban44 deleted the feat/token-endpoint branch December 3, 2022 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core` TypeScript Issues relating to TypeScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant