v5 Battlenet Provider Setup Examples? #11590
Unanswered
Chipinators
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there, brand new to NextJs and I could use some help with the Battlenet provider.
I'm currently using
"next-auth": "5.0.0-beta.20"
Does anyone have an example of how to correctly setup the callback
jwt
/session
functions for the Battlenet provider? I can't seem to get it working correctly to handle expired tokens and I can't seem to find any examples online. I am also assuming this need to be manually setup because I'm not sure how else to get the access token for follow-up api callsWas looking through this issue because its a similar issue to what I am facing where the expiration tokens seem to be getting set incorrectly.
I'm logging the initial token / account / user data from the
jwt
callbackHowever, the follow-up
jwt
callback gives this token data:It looks like its setting the expiration date to 1-month when the token received specified 24 hours. I'm not really sure if its an issue with me setup, or something else.
This is what I was able to scrap together so far so that I can have access to the access_token for other api calls.
Any examples of how to properly set this up correctly would be extremely helpful!
Edit:
I have also tried manually setting the
token.exp
value from theaccount.expires_at
value and that did nothing.Beta Was this translation helpful? Give feedback.
All reactions