mongodb / stitch-js-sdk

MongoDB Stitch JavaScript SDK
Apache License 2.0
113 stars 67 forks source link

Property 'activeUserAuthInfo' does not exist on type 'StitchAuth'.ts #380

Open SheaBelsky opened 4 years ago

SheaBelsky commented 4 years ago

Problem

When I start a new project with the Stitch JavaScript SDK, while also using TypeScript, I get this error:

Property 'activeUserAuthInfo' does not exist on type 'StitchAuth'.ts

Code:

// Get the logged in user's access token from the StitchAuth interface
export async function getAccessToken(credential: StitchCredential) {
  await app.auth.loginWithCredential(credential);
  const { accessToken } = app.auth.activeUserAuthInfo;
  return accessToken;
}

I am following this guide: https://docs.mongodb.com/stitch/graphql/connect-from-a-client-application/#create-a-graphql-client

gigerbytes commented 4 years ago

Also encountering this issue.

lawmbass commented 4 years ago

Ran into the same issue 😭