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

Investigate google group scope #67

Open
eldu opened this issue Feb 14, 2024 · 0 comments
Open

Investigate google group scope #67

eldu opened this issue Feb 14, 2024 · 0 comments
Labels
question Further information is requested

Comments

@eldu
Copy link

eldu commented Feb 14, 2024

The following code would have let us see a user's groups. However, I hit a 403. It's possible that the Google Workspace administrator has not granted the necessary permissions for your application to access the groups.

We're asking OIT if it's a permission we can add

// provider.addScope(
//   "https://www.googleapis.com/auth/admin.directory.group.readonly"
// );
const collectionName = 'publications';

export const handleLogin = async () => {
  try {
    await signInWithPopup(auth, provider);
    // const credential = GoogleAuthProvider.credentialFromResult(result)
    // const token = credential.accessToken
    // const user = result.user

    // const response = await fetch(`http://admin.googleapis.com/admin/directory/v1/groups?userKey=${encodeURIComponent(user.email)}`, {
    //     headers: {
    //       'Authorization': `Bearer ${token}`
    //     }
    // })
This was referenced Feb 14, 2024
@eldu eldu added the question Further information is requested label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant