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

Auth provider Figma uses deprecated scope #1827

Closed
2 tasks done
smogg opened this issue Nov 1, 2024 · 0 comments · Fixed by #1831 or hbasria/auth#1
Closed
2 tasks done

Auth provider Figma uses deprecated scope #1827

smogg opened this issue Nov 1, 2024 · 0 comments · Fixed by #1831 or hbasria/auth#1
Labels
bug Something isn't working

Comments

@smogg
Copy link
Contributor

smogg commented Nov 1, 2024

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Figma API deprecated the scope file_read and replaced it with more granual controls over the permissions requested from user. The auth code still uses the outdated scope that requests all the available permissions during sign in:

// Figma only provides the "file_read" scope.
oauthScopes := []string{
"file_read",
}

To Reproduce

Setting up sign in with Figma and one of the currently supported scopes results in broken authentication showing Cannot pass in both the file_read and files:read scopes during redirect.

const { error } = await supabase.auth.signInWithOAuth({
    provider: 'figma',
    options: {
      redirectTo: authRedirect,
      scopes: 'files:read',
    },
  });

Expected behavior

Figma API doesn't seem to provide a more minimalistic scope than files:read so I guess that should be the new default.

@smogg smogg added the bug Something isn't working label Nov 1, 2024
J0 pushed a commit that referenced this issue Nov 12, 2024
Closes #1827 by defaulting to `files:read` oAuth scope for Figma as per
the issue.
@J0 J0 closed this as completed in #1831 Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant