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

Google Picker Asking To Sign In Even After Providing Access Token #132

Open
shoaibkh4n opened this issue Aug 1, 2022 · 2 comments
Open
Assignees

Comments

@shoaibkh4n
Copy link

Summary

I'm requesting accesstoken from backend . But when I pass the Oauthtoken it is asking to signin
Anyone know about it.

@shoaibkh4n
Copy link
Author

shoaibkh4n commented Aug 1, 2022

Code:

if (response.status === 200) {
gapiLoaded();

      function gapiLoaded() {
        window.gapi.load("picker", intializePicker);
      }
      function intializePicker() {
        console.log("pick loaded");
        pickerInited = true;
        showPicker();
      }

      const showPicker = () => {
        const picker = new window.google.picker.PickerBuilder()
          .addView(window.google.picker.ViewId.FOLDERS)
          .setOAuthToken(data.token)
          .setDeveloperKey(DKEY)
          .setCallback(pickerCallback)
          .build();
        picker.setVisible(true);
      };

}

@zick2
Copy link

zick2 commented Dec 2, 2022

@shoaibkh4n How did you go around this?

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

3 participants