You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the GitHub OAuth Provider, I am unable to make valid API requests to GitHub with the access_token contained in session data that is returned. Login is successful, but using the access_token returns a 401, with "Bad Credentials" from GitHub. I can confirm that using the same access_token in a raw CURL request outside of my app returns the same error.
supabase.auth.onAuthStateChange((event,session)=>{// TODO: Temp for dev purposesconsole.log("Session: ",session);});
Attempted to use the access_token included in the session object as a bearer token in auth header, via cURL request to eliminate other variables. And hit any REST endpoint in the GitHub API
See that this token fails.
Expected behavior
Should successfully access the GitHub API
System information
OS: OSX
Version of supabase-js: "@supabase/supabase-js": "^2.39.3"
Bun Runtime
Additional context
Have been blocked on this for at least 2 weeks now.
The text was updated successfully, but these errors were encountered:
Could you try using the provider_token in the session response instead? The access_token is typically used for authenticating against Supabase Auth while the provider token might be more relevant when access oauth provider related endpoints.
Going to close for now but feel free to re-open if the issue persists
Bug report
Describe the bug
When using the GitHub OAuth Provider, I am unable to make valid API requests to GitHub with the
access_token
contained in session data that is returned. Login is successful, but using theaccess_token
returns a 401, with "Bad Credentials" from GitHub. I can confirm that using the same access_token in a raw CURL request outside of my app returns the same error.To Reproduce
access_token
included in the session object as a bearer token in auth header, via cURL request to eliminate other variables. And hit any REST endpoint in the GitHub APIExpected behavior
Should successfully access the GitHub API
System information
"@supabase/supabase-js": "^2.39.3"
Additional context
Have been blocked on this for at least 2 weeks now.
The text was updated successfully, but these errors were encountered: