Skip to content

Notion OAuth provider returns 403 when retrieving user profile (GoTrue v2.188.1) #2437

@matheobz

Description

@matheobz

Hi team, first of all thanks for the amazing work on Supabase Auth — really appreciate it!
I've run into an issue with the Notion OAuth provider on GoTrue v2.188.1.
After completing Notion OAuth flow, GoTrue calls /v1/users/me on Notion's API and receives a 403 error. The user info (name, email) is available in the token exchange response under owner.user but is not being used.

Error in logs:

"error": "a 403 error occurred with retrieving user from notion"
"msg": "500: Error getting user profile from external provider"
GoTrue version: v2.188.1

Steps to reproduce:

  1. Configure Notion OAuth provider in Supabase project
  2. Set "Read user information including email addresses" in Notion integration capabilities
  3. Click "Sign in with Notion"
  4. After Notion authorization, callback fails with 403

Expected: User is created/logged in using owner.user data from the token exchange response
Actual: GoTrue makes a separate call to /v1/users/me which returns 403 for OAuth tokens

Happy to provide any additional info or test a fix if needed. Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions