Skip to content

Commit

Permalink
fix(next): fix get context params (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangsijie authored Nov 1, 2023
1 parent 2f98404 commit 1fb7878
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/angry-glasses-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@logto/next": patch
---

Fix Next.js edge SDK's getContext, pass config to get access token
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ cache
.history
.vercel
.next
*.local
2 changes: 1 addition & 1 deletion packages/next/edge/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class LogtoClient extends BaseClient {

getLogtoContext = async (request: NextRequest, config: GetContextParameters = {}) => {
const { nodeClient } = await this.createNodeClientFromEdgeRequest(request);
const context = await nodeClient.getContext();
const context = await nodeClient.getContext(config);

return context;
};
Expand Down

0 comments on commit 1fb7878

Please sign in to comment.