Conversation
858a7c5 to 3115040 Compare | I haven't still test the code in action, I'll attach a screenshot once I'm done and open the PR. |
TharakaUJ left a comment
There was a problem hiding this comment.
The package is building fine now, but I noticed that the Next.js SDK has a separate server-side provider under packages/nextjs/src/server.
For now, to avoid build failures, I wired these methods through the existing client implementation.
I'm wondering whether I should follow the same pattern as in signIn, signOut etc. and create some implementation in packages/nextjs/src/server/actions.
@brionmario any advice?
| Hey @TharakaUJ, Thanks a lot for the PR. In the Next.js SDK, since we have a server side, token handling is done at the server level. |
3115040 to 6f6325f Compare 6f6325f to cb916a3 Compare expose getIdToken, getDecodedIdToken, getAccessToken, and exchangeToken methods through AsgardeoContext in the Next.js SDK.
cb916a3 to e49836a Compare Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. |


Purpose
This PR introduces getIdToken API and exposes the following token-related APIs via the Next.js SDK context for parity with the React SDK:
This allows Next.js applications to access both raw and decoded tokens and perform token exchange using the same API surface as React.
Related Issues
idTokenfrom the SDK #249Related PRs
Checklist
Security checks