Assistance Needed: Implementing Firebase Social Authentication in Ionic React App

Hi Ionic Community,

I’m currently embarking on a project to develop an Ionic React application and am looking to integrate social authentication using Firebase, specifically targeting Google and Microsoft login methods. While there are numerous guides available, they predominantly focus on traditional email and password authentication. My objective is to enhance user accessibility and security by utilizing social logins.

Previously, I successfully implemented social authentication using the Auth0 react package, which was straightforward. However, transitioning to Firebase has presented some challenges that I have yet to overcome.

Here’s the situation:

Development Environment: Ionic React App
Target: iPhone 15 simulator
Issue Encountered: Upon utilizing signInWithRedirect with Firebase’s Google authentication provider, the process redirects to Safari as expected. However, instead of completing the authentication flow, it merely loads a web version of my application without any indication of successful authentication or redirection back to the app.

Has anyone encountered a similar issue, or does anyone have insights into integrating Firebase social logins within an Ionic React application? Any guidance, code snippets, or resource recommendations would be incredibly beneficial.

I’m particularly interested in:

  1. Configurations specific to Ionic React that might differ from standard React apps.
  2. Adjustments required to handle the authentication flow correctly in a mobile environment.
  3. Tips for ensuring the app properly redirects back after authentication rather than remaining in the browser.

Thank you for your time and assistance. I’m eager to learn from this knowledgeable community and resolve this integration hurdle.

As for redirecting from the browser back to the app, you probably need to have deep links configured in Capacitor.

I have been working on trying to get the deep links working because I think you’re probably spot on but I cannot for the life of me get it to work for iOS. Im hosting the app with Firebase and set up the AASA and it should be working I think but when I build the app on my phone and click a like with that domain, it just opens Safari and not the app itself.