@oneblink/apps-react
    Preparing search index...

    Function getIdToken

    • Get the Id Token used to make requests to the OneBlink API. This will return undefined if the current user is not logged in.

      const idToken = await authService.getIdToken()
      if (idToken) {
      await fetch(url, {
      headers: {
      Authorization: `Bearer ${idToken}`,
      },
      })
      } else {
      // Handle user not being logged in
      }

      Returns Promise<string | undefined>