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

Update callbacks.md #1689

Closed
wants to merge 1 commit into from
Closed

Conversation

AustinKirby
Copy link

@AustinKirby AustinKirby commented Apr 11, 2021

This update fixes an issue with @types/next-auth. Since the Session type doesn't have an accessToken value you need to set it in the return statement. Since the return is WithAdditionalParams we can tack on accessToken there.

What:

This update fixes an issue with @types/next-auth. Since the Session type doesn't have an accessToken value you need to set it in the return statement. Since the return is WithAdditionalParams we can tack on accessToken there.

Why:

@types/next-auth Session type doesn't contain a accessToken value

How:

By submiting the token in the return statement you are utilizing WithAdditionalParams type

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

This update fixes an issue with @types/next-auth. Since the Session type doesn't have an accessToken value you need to set it in the return statement. Since the return is WithAdditionalParams<Session> we can tack on accessToken there.
@vercel
Copy link

vercel bot commented Apr 11, 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/HRJB5WfXdwuxseWoULkszvmWyewY
✅ Preview: https://next-auth-git-fork-austinkirby-patch-1-nextauthjs.vercel.app

@vercel vercel bot temporarily deployed to Preview April 11, 2021 17:18 Inactive
@github-actions github-actions bot added the docs Relates to documentation label Apr 11, 2021
@ubbe-xyz
Copy link
Collaborator

Thanks for raising a PR 💚

I think the examples on the websites are currently just in plain JS, hence I don't think we should be using TS syntax on them.

There's an epic going on to move the types to this repo to make them easier to maintain. When we ship the new types 🚀 ( hopefully around end of next week ) they'll come with support for module agumentation which I think will help in this specific issue.

@balazsorban44
Copy link
Member

Came here to say the same as @lluia. Going to close this. Look out for #1649

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Relates to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants