© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago
Favoriere

Supabase auth for React Native application

Hello,

I try to use supabase auth for React Native application.

I use @react-native-google-sign and @react-native-fbsdk-next.
For Google it should be something like:
const { idToken } = await GoogleSignin.signIn()

// Create a Google credential with the token
const googleCredential = supabase.auth.signInWithIdToken({
  provider: 'google',
  token: idToken,
})
const { idToken } = await GoogleSignin.signIn()

// Create a Google credential with the token
const googleCredential = supabase.auth.signInWithIdToken({
  provider: 'google',
  token: idToken,
})


For Facebook similar:
const result = await LoginManager.logInWithPermissions(['public_profile', 'email'])

if (result.isCancelled) {
  throw 'User cancelled the login process'
}

// Once signed in, get the users AccesToken
const data = await AccessToken.getCurrentAccessToken()

if (!data) {
  throw 'Something went wrong obtaining access token'
}

// Create a Firebase credential with the AccessToken
const facebookCredential = await supabase.auth.signInWithIdToken({
  provider: 'facebook',
  token: data.accessToken,
})
const result = await LoginManager.logInWithPermissions(['public_profile', 'email'])

if (result.isCancelled) {
  throw 'User cancelled the login process'
}

// Once signed in, get the users AccesToken
const data = await AccessToken.getCurrentAccessToken()

if (!data) {
  throw 'Something went wrong obtaining access token'
}

// Create a Firebase credential with the AccessToken
const facebookCredential = await supabase.auth.signInWithIdToken({
  provider: 'facebook',
  token: data.accessToken,
})


But it does not work.

There are questions I have:
1. For Facebook
AccessToken.getCurrentAccessToken
AccessToken.getCurrentAccessToken
returns base64, but not JWT.
2. For Google I have not found where to find or required parameters to configure the integration?

Could you please help me to figure out on how to implement it and move from Firebase to Supabase?

Thank you for your help much!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

React Native + Expo + Supabase Auth
SupabaseSSupabase / help-and-questions
3y ago
Supabase Auth with Apple Oauth and Expo -> React Native
SupabaseSSupabase / help-and-questions
9mo ago
Google Auth with React Native using supabase-js v2.
SupabaseSSupabase / help-and-questions
4y ago
Clerk/Supabase React-native Integration
SupabaseSSupabase / help-and-questions
8mo ago