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

Not working with Next 13 App Router #289

Closed
samiam376 opened this issue Jun 14, 2023 · 0 comments
Closed

Not working with Next 13 App Router #289

samiam376 opened this issue Jun 14, 2023 · 0 comments

Comments

@samiam376
Copy link

I'm trying to authorize Procore on an api route with next 13 and I'm receiving an empty result from grant.vercel.

my provider

    access_url: 'https://sandbox.procore.com/oauth/token',
    authorize_url: 'https://sandbox.procore.com/oauth/authorize',
    request_url: 'https://sandbox.procore.com/oauth/token',
    redirect_uri: getProcoreRedirectUri(),
    client_id: getProcoreClientId(),
    client_secret: getProcoreClientSecret(),
    oauth: 2,
  };```

my conifg ```  const config: GrantConfig = {
    defaults: {
      origin: 'http://localhost:3000',
      state: true,
      prefix: '/api/oauth',
      transport: 'state',
      response: ['tokens', 'raw', 'jwt', 'profile'],
    },
    procore: PROCORE_DEV,
  };

  const grantVercel = grant.vercel({
    config,
    session: { secret: 'grant' },
  });```.

I'm passing in a NextRequest object for the request - which I think may be causing issues. 
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