I'm interested in this too. I've been exploring options the last couple days. Some more sample code from here would be helpful: https://docs.expo.dev/guides/authentication/ There is a few tutorials I have seen, this one looked fairly good when I reviewed it. https://medium.com/@gbenleseun2016/guide-to-sign-in-with-google-on-the-expo-platform-using-expo-auth-session-9d3688d2107a If others have better recommendations I'd love to review them. Answer from zztroyzz on reddit.com
🌐
Reddit
reddit.com › r/expo › expo auth session, google oauth and android
r/expo on Reddit: Expo Auth Session, Google OAuth and Android
May 6, 2025 -

I've been trying to set up google oauth for the android version of the application that I'm building. Below you will find a code snippet of the initial set up that I had. I have gone through several iterations of how I've been setting up the code to work with the android version however the error that I keep getting is a URI redirect mismatch. I understand what the error means but I'm not sure what I'm doing wrong.

In the google developers console in the android section, there are 3 inputs where I can enter information.

name: this doesn't matter AFAIK
Package.name: I've tried to set this either the scheme in my app.json or the android.package name
SHA-1 Fingerprint certificate: I got this value from doing eas credentials.

I'm fairly certain that I'm screwing up the package.name input.

App.json scheme: com.john-doe.mobile-client

android.package: com.john-doe.appname_android

Im going to make the scheme and the package name the same then will rebuild. I will probably need to update the sha-1 fingerprint certificate also after a rebuild. Once the build is done I'll come back to update this but I'm honestly stumped.

import { useAuthRequest } from "expo-auth-session/providers/google";

WebBrowser.maybeCompleteAuthSession();
const [request, response, promptAsync] = useAuthRequest({
        androidClientId:
            "myadroid-client-id.apps.googleusercontent.com",
        iosClientId:
            "myios-client-id.apps.googleusercontent.com",
    });

    // refactor this to not use useEfffect.
    useEffect(() => {
        if (response?.type === "success") {
            const { authentication } = response;
            const accessToken = authentication?.accessToken;

            if (accessToken) {
                saveAuthToken(accessToken)
                    .then(() => refreshSession())
                    .then(() => router.push("/"))
                    .catch((error) => {
                        console.error("Error saving token:", error);
                    });
            }
        }
    }, [response]);
🌐
Reddit
reddit.com › r/reactnative › expo-google-app-auth vs expo-auth-session
r/reactnative on Reddit: expo-google-app-auth vs expo-auth-session
November 11, 2021 -

Expo on their page wants us to use expo-auth-session over expo-google-app-auth.

But,

  • The expo-auth-session flow throws an ugly / scammy looking alert to the user before going into the google auth flow in an external browser, after showing a browser selection. Users are likely to drop off at this point itself, this is bad UX.

  • expo-google-app-auth doesn't do this, it seems to load what looks like a webiew inline and shows a clean google account selection screen.

  • However if you ignore this deprecation and continue using expo-google-app-auth, there is a runtime warning like "Deprecated: You will need to use expo-google-sign-in to do server side authentication outside of the Expo client" which I find confusing. Don't you have to do server side authentication (if you need to) regardless of which solution you use?

Thoughts around this? If you use the expo managed workflow, which one did you pick? I am at a bit of a dilemma...

🌐
Reddit
reddit.com › r/expo › problems with expo-auth-session
r/expo on Reddit: Problems with expo-auth-session
October 12, 2025 -

Hi there! I'm working in a personal project and I want to make a log in and sign up with google, then I have been working with expo-auth-session (https://docs.expo.dev/versions/latest/sdk/auth-session/) and google cloud. The issue is that when I make log in, it never gets back to my app, everytime it redirect to google.com

I'm working in android. How can I fix this problem? did you find this issue anytime?

thanks you for advice!

Edit: My login button component is this (it's just a test, I never do it before):

WebBrowser.maybeCompleteAuthSession();
export const Login = () => {
  const [request, response, promptAsync] = Google.useAuthRequest({
    androidClientId: config.GOOGLE_ANDROID_CLIENT_ID,
    clientId: config.GOOGLE_ANDROID_CLIENT_ID,
  });
  const testSending = async (token: string) => {
    console.log("=========================TOKEN========================");
    console.log(token);
    console.log("=================================================");
  };
  useEffect(() => {
    if (response) {
      if (response.type === 'success') {
        const { authentication } = response;
        testSending(authentication?.idToken || ''); 
        console.log(authentication);
      }else {
        console.log("=========================FAILED========================");
        console.log("Login failed");
        console.log("=================================================");
      }
    }
  }, [response])


  return (
    <Pressable onPress={() => promptAsync().catch((error) => console.error(error))} disabled={!request} style={{ padding: 10, backgroundColor: 'blue' }}>
      <Text style={{ color: 'white' }}>Login with Google</Text>
    </Pressable>
  )
}
🌐
Reddit
reddit.com › r/expo › expo expo-auth-session & google calendar oauth setup
r/expo on Reddit: Expo expo-auth-session & Google Calendar OAuth setup
February 7, 2025 -

I’m working on integrating Google Calendar OAuth into my React Native app using Expo, and I’m running into an issue where the redirect URI returned by makeRedirectUri({ useProxy: true }) is wrong — it’s always exp://127.0.0.1:8081, even though I’m expecting the Expo proxy URI (e.g. https://auth.expo.io/@username/myapp) to be returned.

I’ve been debugging this for hours and would really appreciate any advice or insight.

Some Context:

I’m using expo-auth-session version ~5.5.2 My app is built with Expo Router and uses OAuth to Google Calendar I want to allow users to connect their Google Calendar and add events from our app I’m using web-based OAuth, not direct sign-in or server-side flows Running locally via expo & Android studio

This is my code snippet:

import { makeRedirectUri, useAuthRequest, ResponseType } from 'expo-auth-session'; import * as WebBrowser from 'expo-web-browser'; import { useEffect } from 'react'; import config from '@/config';

WebBrowser.maybeCompleteAuthSession();

const discovery = { authorizationEndpoint: 'https://accounts.google.com/o/oauth2/v2/auth', tokenEndpoint: 'https://oauth2.googleapis.com/token', };

export function useGoogleAuth() { const redirectUri = makeRedirectUri({ useProxy: true, scheme: 'my app name', });

console.log('[useGoogleAuth] redirectUri =', redirectUri);

const [request, response, promptAsync] = useAuthRequest( { clientId: config.googleClientId, scopes: ['https://www.googleapis.com/auth/calendar.events'], redirectUri, responseType: ResponseType.Code, extraParams: { access_type: 'offline', prompt: 'consent', }, }, discovery );

useEffect(() => { console.log('[useGoogleAuth] response =', response); }, [response]);

return { promptAsync, request, response }; }

And yes I added authorized uris and authorized test users in Google cloud console.

I also added the redirect URI: https://auth.expo.io/@myusername/myapp to google.

My questions: • Why is makeRedirectUri({ useProxy: true }) still giving me exp://127.0.0.1:8081? • Is there some config I’m missing in app.json, expo-router, or somewhere else? • Should I upgrade expo-auth-session or use a different method to get the correct proxy URI?

Thanks

🌐
Reddit
reddit.com › r/expo › google sign in works on expo go but it doesn't work on standalone app
r/expo on Reddit: Google sign in works on expo go but it doesn't work on standalone app
January 29, 2024 -

Hello everyone, im trying to implement google sign in to my app, but i cant make it work on my build (expo go is working). So far i've tried enabling custom uri schemes on google console but after signin nothing happens, the app just keeps on loading. I've tried adding a redirectUri but that gets me the error "Error 400: invalid_request", Details: "redirec_uri=exp://my-slug-here". So my question is, how can i set up this properly? Any help is really appreciated, here's my code:

import * as WebBrowser from "expo-web-browser";
import * as Google from "expo-auth-session/providers/google";
import * as AuthSession from 'expo-auth-session';

const redirectUri = AuthSession.makeRedirectUri({
useProxy: false,
native: 'exp://slug-here',
});
const [request, response, promptAsync] = Google.useIdTokenAuthRequest({
clientId:
"clientId",
androidClientId: "androidId",
redirectUri
});

🌐
Reddit
reddit.com › r/reactnative › google sign in doesn't work using supabase + expo authsession (native ios)
r/reactnative on Reddit: Google Sign In doesn't work using Supabase + Expo AuthSession (native iOS)
June 8, 2025 -

Hey,
I'm stuck on what should be a pretty standard setup: Google Sign-In using Supabase + expo-auth-session in a React Native app (EAS build, TestFlight) — and I keep getting a 400 error (invalid_request) when trying to sign in.

Here’s my setup:

expo-auth-session/providers/google

  • supabase-js@2

  • react-native

  • EAS Build (production)

  • TestFlight (not Expo Go)

  • supabase.auth.signInWithIdToken({ provider: 'google', token })

Google Cloud config:

  • Created a client ID for iOS

    • Bundle ID, App Store ID and Team ID are set correctly

  • Scopes enabled: openid, email, profile. All three are visible under “Non-sensitive scopes”

Supabase config:

  • Google provider enabled

  • Client ID = the iOS one above

  • Callback URL (non-editable): https://xxxxx.supabase.co/auth/v1/callback

const redirectUri = makeRedirectUri({

native: '*myapp*://oauthredirect',

useProxy: false,

});

const [request, response, promptAsync] = Google.useAuthRequest({

clientId: ENV.GOOGLE_IOS_CLIENT_ID,

scopes: ['openid', 'profile', 'email'],

redirectUri,

});

  • App scheme is correctly set in app.json and Info.plist

  • Response returns type: success, but Google blocks the flow and shows:

"Error 400: invalid_request

redirect_uri=myapp://oauthredirect

This app doesn't comply with Google OAuth policies."

What I’ve tried:

  • Triple-checked bundle ID, scopes, and redirect URI

  • Registered everything as expected in both Google Cloud and Supabase

  • Used only native redirect (no useProxy)

  • No Expo Go — only TestFlight builds

  • Enabled the iOS client in Supabase with correct client ID

Would love any guidance been stuck for days. Thanks 🙏

🌐
Reddit
reddit.com › r/reactnative › how to use expo authsession google provider alongside a backend like pocket base, straps or custom backend
r/reactnative on Reddit: How to use Expo AuthSession Google provider alongside a backend like pocket base, straps or custom backend
March 29, 2023 -

Hi guys, I’m trying to use expo AuthSession to allow a user to sign into my app using Google, I’ve got this working which returns a token with which I can get the user details. But what are the next steps, how will my backend validate this Google token/know which assets in my DB belong to this user?

I wanted to do this using strapi as I just wanted to create a simple mock backend for now and strapi has a Google plugin but it asks for a redirect url flow which Expo AuthSession already handles.

Thanks

Title means to say: Strapi

Find elsewhere
🌐
Reddit
reddit.com › r/reactnative › google authentication
r/reactnative on Reddit: Google Authentication
May 28, 2023 -

I've encountered a challenge with Expo and Google authentication. It seems that Expo's AuthSession
is deprecated, and attempts to use the u/react-native-google-signin/google-signin
library in Expo Go lead to issues due to custom native code requirements.

I'm eager to know if Google authentication is still possible in Expo, or if it's restricted to bare React Native projects. If it's achievable in Expo, could anyone provide insights or suggest a guide on the recommended approach?

I appreciate any guidance or experiences shared by the community.

🌐
Expo Documentation
docs.expo.dev › versions › latest › sdk › auth-session
AuthSession - Expo Documentation
For example, use @react-native-google-signin/google-signin for Google authentication and react-native-fbsdk-next for Facebook. For more information, see Authentication overview. expo-crypto is a peer dependency and must be installed alongside expo-auth-session.
🌐
Reddit
reddit.com › r/supabase › supabase google o auth (react native with expo) - no session created
r/Supabase on Reddit: Supabase Google O Auth (React Native with expo) - no session created
February 6, 2025 -

I’m trying to set up google auth with react native (expo). I’m using signInWithOAuth, and it is working in that the user can sign in and a row is created as an authenticated user in supabase.

However, my _layout file uses supabase.auth.onAuthStateChange , and then if there is a session, it redirects the user to the home page, and if there isn’t a session, it redirects them to the welcome page.

However, when I use signInWithOAuth, it doesn’t create a session in supabase, so onAuthStateChange cannot find a session.

What is the best way to go about this? How do I create a session in supabase when I use google sign up????

🌐
Reddit
reddit.com › r/expo › still stuck with google login redirect uri using expo 😩 any way without dev build?
r/expo on Reddit: Still stuck with Google login redirect URI using Expo 😩 any way without dev build?
September 24, 2025 -

So yeah, hitting a wall here.
I’m trying to set up Google login in my Expo React Native app using expo-auth-session

The issue → redirect URI keeps blocking me. Google keeps throwing the “Authorization Error / redirect_uri_mismatch” thing.

What I’ve done so far:

  • Set the redirect URIs in Google Cloud console (double-checked them like 100x 🙃)

  • Scraped through YouTube tutorials, blog posts, random Github issues

  • Even tried adding different variations of the redirect URI manually

  • Still stuck.

I don’t want to use a dev build just for this (my setup is still Expo managed).
👉 Is there any way to set this up properly without ejecting / going full dev build?

If anyone has done Google auth with expo-auth-sessionrecently and has some working setup, would really appreciate pointers 🙏. Also want to know how to set this if I am moving to production.

🌐
Reddit
reddit.com › r/expo › google oauth 2.0 invalid_request:400 with expo android app
r/expo on Reddit: google oauth 2.0 invalid_request:400 with expo android app
February 6, 2025 -

Its my first time doing Oauth authentication with expo, and im only running the app on android and when i try to authenticate with google i get the following error: You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure.

also from the documentation i dont understand at all what should be the redirect_uri and thats probably the problem, i cant find an absolute answer of what should be the redirect_uri

thats my code:

import React, { useEffect, useState } from "react";
import { Button, Text, View } from "react-native";
import * as AuthSession from "expo-auth-session";
import * as Google from "expo-auth-session/providers/google";
import * as SecureStore from "expo-secure-store";

export default function App() {
  const [user, setUser] = useState(null);

  const [request, response, promptAsync] = Google.useAuthRequest({
    androidClientId: process.env.EXPO_PUBLIC_ANDROID_GOOGLE_CLIENT_ID,
    selectAccount: true, 
    redirectUri: "com.anonymous.pystart://oauth2redirect"
  });
  
  

  useEffect(() => {
    if (response?.type === "success") {
      const { authentication } = response;
      handleLogin(authentication?.accessToken);
    }
  }, [response]);

  async function handleLogin(token: string | undefined) {
    const userInfoResponse = await fetch(
      "https://www.googleapis.com/userinfo/v2/me",
      {
        headers: { Authorization: `Bearer ${token}` },
      }
    );
    const userInfo = await userInfoResponse.json();
    setUser(userInfo);
    await SecureStore.setItemAsync("userToken", token);
  }

  return (
    <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
      {user ? (
        <Text>Welcome, {user.name}</Text>
      ) : (
        <Button
          title="Sign in with Google"
          disabled={!request}
          onPress={() => promptAsync()}
        />
      )}
    </View>
  );
}
import React, { useEffect, useState } from "react";
import { Button, Text, View } from "react-native";
import * as AuthSession from "expo-auth-session";
import * as Google from "expo-auth-session/providers/google";
import * as SecureStore from "expo-secure-store";

export default function App() {
  const [user, setUser] = useState(null);

  const [request, response, promptAsync] = Google.useAuthRequest({
    androidClientId: process.env.EXPO_PUBLIC_ANDROID_GOOGLE_CLIENT_ID,
    selectAccount: true, 
    redirectUri: "com.anonymous.pystart://oauth2redirect"
  });
  
  

  useEffect(() => {
    if (response?.type === "success") {
      const { authentication } = response;
      handleLogin(authentication?.accessToken);
    }
  }, [response]);

  async function handleLogin(token: string | undefined) {
    const userInfoResponse = await fetch(
      "https://www.googleapis.com/userinfo/v2/me",
      {
        headers: { Authorization: `Bearer ${token}` },
      }
    );
    const userInfo = await userInfoResponse.json();
    setUser(userInfo);
    await SecureStore.setItemAsync("userToken", token);
  }

  return (
    <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
      {user ? (
        <Text>Welcome, {user.name}</Text>
      ) : (
        <Button
          title="Sign in with Google"
          disabled={!request}
          onPress={() => promptAsync()}
        />
      )}
    </View>
  );
}
🌐
Reddit
reddit.com › r/reactnative › expo sdk 46 expo-auth-session google auth, is it possible to make it work without going bare expo?
r/reactnative on Reddit: Expo sdk 46 expo-auth-session google auth, is it possible to make it work without going bare expo?
July 20, 2020 -

I'm working on a project where I need to implement the social auth in a mobile app, the thing is I'm stuck in the auth with expo sdk 46 web based (expo-auth-session), if any one could point me to some help tutorial article that is up to date.

i found solutions that forces me to go bare expo and that will break the real point of using expo.

Sorry if it seems hectic I'm just a junior dev with some experience in react only, in the start I really enjoyed react native and looked to me so similar to react.js but know the differences are starting to come.

Thank you for your help in advance.

🌐
Reddit
reddit.com › r/expo › my experience on migrating from the deprecated googlesignin to credential manager
r/expo on Reddit: My experience on migrating from the deprecated GoogleSignIn to Credential Manager
November 25, 2024 -

So I noticed I warning few days ago in my play console saying the GoogleSignIn will be deprecated in 2025 and so I rushed to migrate to the new Credential Manager.

Before, I used the free version of react-native-google-signin which doesn't support the new Credential Manager sign in, only the sponsored one does, apparently. So I found a package that does - heartbot/expo-google-authentication/expo-google-authentication.

What I noticed that, there's no SilentSignIn method anymore, apparently Credential Manager doesn't support it anymore, which is a bummer, since it was a seamless way to refresh the idToken before doing my authenticated backend calls. Right now there are two ways to sign in the user:

  1. login() method - which you use when the user shows intent to login, for example by pressing a login button. When initiated it shows a modal with your accounts to select from.

  2. loginWithoutUserIntent() method - when called, shows a bottom sheet that slides up. If the user only has one google account, it automatically logins with that account and the bottom sheet closes. If there's more than one account, the user must select which account they want to login with.

So instead of SilentSignIn I must now call loginWithoutUserIntent() every hour (idToken is valid for 1 hour) which is not ideal, as you can imagine.

I really, really don't want to create a complicated custom authentication flow for my app just for a valid auth token, so I will keep it as is for now, which is using the old GoogleSignIn, but ready to push the new one with Credential Manager to play store if need be.

What I wonder is, if the deprecated GoogleSignIn will stop working in 2025 and all the apps using it will have to be updated, or will it continue working as the dev of react-native-google-signin implies.

🌐
Reddit
reddit.com › r/expo › error with google oauth 2.0 using auth-session library regarding redirect_uri ios
r/expo on Reddit: Error with Google Oauth 2.0 using auth-session library regarding redirect_uri ios
October 9, 2024 - import * as Google from "expo-auth-session/providers/google"; import { makeRedirectUri } from 'expo-auth-session'; // google auth setup const [googleRequest, googleResponse, googlePromptAsync] = Google.useAuthRequest({ selectAccount: true, webClientId: googleWebClientId || process.env.EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID, androidClientId: googleAndroidClientId || process.env.EXPO_PUBLIC_GOOGLE_ANDROID_CLIENT_ID, iosClientId: googleIosClientId || process.env.EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID, redirectUri: makeRedirectUri(), }); Share
🌐
Reddit
reddit.com › r/reactnative › help understanding expo auth session / oauth
r/reactnative on Reddit: Help Understanding Expo Auth Session / OAuth
December 27, 2018 -

Recently I have started a project that involves OAuth I am able to reach the project I set up on google using this guide: https://docs.expo.io/guides/authentication/#google, but I do not know how exactly to communicate with my RoR backend.

Currently if I sign in using the google the web browser dismisses but I am still on my sign in page. I need some way to pass credentials back to my app

🌐
Reddit
reddit.com › r/reactnative › google sign in works on expo go but it doesn't work on standalone app
r/reactnative on Reddit: Google sign in works on expo go but it doesn't work on standalone app
December 29, 2023 -

Hello everyone, im trying to implement google sign in to my app, but i cant make it work on my build (expo go is working). So far i've tried enabling custom uri schemes on google console but after signin nothing happens, the app just keeps on loading. I've tried adding a redirectUri but that gets me the error "Error 400: invalid_request", Details: "redirec_uri=exp://my-slug-here". So my question is, how can i set up this properly? Any help is really appreciated, here's my code:

import * as WebBrowser from "expo-web-browser";
import * as Google from "expo-auth-session/providers/google";
import * as AuthSession from 'expo-auth-session';

const redirectUri = AuthSession.makeRedirectUri({
useProxy: false,
native: 'exp://slug-here',
});
const [request, response, promptAsync] = Google.useIdTokenAuthRequest({
clientId:
"clientId",
androidClientId: "androidId",
redirectUri
});