Recently, I ran into a problem where, upon logging in with Google, I found myself needing access tokens for Twitter and LinkedIn to send out API requests. The issue came about when NextAuth modified my session data to be from either Twitter or LinkedIn instead of retaining the information from my initial Google sign-in. How might I go about solving this dilemma?
To tackle this challenge effectively, it seems necessary to tweak the implementation of NextAuth to accommodate multiple authentication providers without interfering with the existing session data structure. Alternatively, I could delve into other authentication methods or frameworks that are capable of handling various providers while upholding the desired session continuity.