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

The header is missing the info about the account id for the user #2

Open
kamalbuilds opened this issue Oct 29, 2024 · 1 comment
Open

Comments

@kamalbuilds
Copy link

kamalbuilds commented Oct 29, 2024

Screenshot 2024-10-29 at 9 24 41 PM

As you can see in this ss that mbdata in the header is coming as null.

Code below

import { headers } from 'next/headers';
import { NextResponse } from 'next/server';

export async function GET() {

  const headersList = headers();
  const mbMetadata = JSON.parse(headersList.get('mb-metadata') || '{}');
  const accountId = mbMetadata?.accountData?.accountId || 'near';

  return NextResponse.json({ accountId: accountId });
}
@kamalbuilds
Copy link
Author

@microchipgnu @SurgeCode anything to solve this ?

jaswinder6991 pushed a commit to Harmonic-Guild/agent-next-boilerplate that referenced this issue Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant