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

Open
#2,437 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go

Research direction

Start at GoTrue's Notion OAuth flow and trace the token exchange response containing owner.user, then reproduce the callback with the listed Notion integration capability. Done means the callback uses the available owner.user data to create or log in the user without failing on the separate /v1/users/me request returning 403.

Written by the indexing model from the issue text.

Description

bug

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!

Dominant language
Go
Stars
2.6k
Forks
764
Avg merge
5d 3h
Merged PRs (30d)
39

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/auth

All issues in supabase/auth

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.