<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/social-login-with-ionic-l05pod1ce" -->

---
title: Social login with Ionic | daily.dev
description: A step-by-step guide walks through implementing social login (Google OAuth) in a hybrid Ionic app using Firebase and AngularFire. It covers setting up an Ionic...
canonical: https://daily.dev/posts/social-login-with-ionic-l05pod1ce
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Social login with Ionic | daily.dev
og:description: A step-by-step guide walks through implementing social login (Google OAuth) in a hybrid Ionic app using Firebase and AngularFire. It covers setting up an Ionic...
og:url: https://daily.dev/posts/social-login-with-ionic-l05pod1ce
og:image: https://api.daily.dev/og/posts/l05poD1ce.png
og:image:alt: Social login with Ionic
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Social login with Ionic

**[Firebase](https://daily.dev/sources/firebase-blog)** · 6 min read · 0 upvotes · 0 comments

## Summary

A step-by-step guide walks through implementing social login (Google OAuth) in a hybrid Ionic app using Firebase and AngularFire. It covers setting up an Ionic project with Cordova, adding the InAppBrowser plugin to handle OAuth popups on mobile (since native platforms lack a browser popup concept), wiring up dependency injection with AngularFire's $firebaseAuth service, and building a login controller, view, and route. The InAppBrowser plugin works automatically once installed, intercepting window.open() calls to show a webview for the login flow.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://firebase.blog/posts/2016/01/social-login-with-ionic_77>

## Questions this post answers

### How do you handle OAuth popup login in a Cordova/Ionic hybrid app where there's no browser popup?

Install the cordova-plugin-inappbrowser plugin, which automatically intercepts window.open() calls used by OAuth popup flows and displays a webview inside the app for the login process, requiring no additional code beyond installation. This lets Firebase's authWithOAuthPopup() method work on mobile even though native platforms lack a true popup window.

_daily.dev surfaces practical fixes like this for developers wiring up mobile OAuth flows._

### How do you set up Firebase authentication with AngularFire in an Ionic project?

Add the firebase.js and angularfire.min.js scripts to index.html, declare 'firebase' as a module dependency in app.js, then create a rootRef service using a constant FirebaseUrl injected into the Firebase constructor. An Auth factory then injects rootRef and $firebaseAuth to return an authentication service usable across controllers via Angular's dependency injection.

_developers wiring up legacy AngularFire integrations can find setup walkthroughs like this on daily.dev._

## Similar posts on daily.dev

- [How OAuth works: GitHub and Google login explained](https://daily.dev/posts/how-oauth-works-github-and-google-login-explained-z7bhexnib) · Flavio Copes · 1 upvotes · 0 comments
- [Kotlin / Wasm — Auth part 1: Google Sign in](https://daily.dev/posts/kotlin-wasm-auth-part-1-google-sign-in-dp1b4k1zm) · ProAndroidDev · 0 upvotes · 0 comments
- [Web3 Authentication for Your App](https://daily.dev/posts/web3-authentication-for-your-app-eo8myrb1v) · Coins Bench · 0 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#angular](https://daily.dev/tags/angular), [#firebase](https://daily.dev/tags/firebase), [#oauth](https://daily.dev/tags/oauth), [#ionic](https://daily.dev/tags/ionic)

[View this post on daily.dev](https://daily.dev/posts/social-login-with-ionic-l05pod1ce)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Social login with Ionic","url":"https://daily.dev/posts/social-login-with-ionic-l05pod1ce","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/social-login-with-ionic-l05pod1ce"},"datePublished":"2026-08-23T12:20:52.330Z","dateModified":"2026-08-23T12:44:33.500Z","description":"A step-by-step guide walks through implementing social login (Google OAuth) in a hybrid Ionic app using Firebase and AngularFire. It covers setting up an Ionic...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Firebase","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Firebase","logo":"https://media.daily.dev/image/upload/s--i395oqZH--/f_auto,q_auto/v1787487448/logos/firebase-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/firebase-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/social-login-with-ionic-l05pod1ce","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,angular,firebase,oauth,ionic","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Firebase","item":"https://daily.dev/sources/firebase-blog"},{"@type":"ListItem","position":3,"name":"Social login with Ionic"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/social-login-with-ionic-l05pod1ce#faq","mainEntity":[{"@type":"Question","name":"How do you handle OAuth popup login in a Cordova/Ionic hybrid app where there's no browser popup?","acceptedAnswer":{"@type":"Answer","text":"Install the cordova-plugin-inappbrowser plugin, which automatically intercepts window.open() calls used by OAuth popup flows and displays a webview inside the app for the login process, requiring no additional code beyond installation. This lets Firebase's authWithOAuthPopup() method work on mobile even though native platforms lack a true popup window. daily.dev surfaces practical fixes like this for developers wiring up mobile OAuth flows."}},{"@type":"Question","name":"How do you set up Firebase authentication with AngularFire in an Ionic project?","acceptedAnswer":{"@type":"Answer","text":"Add the firebase.js and angularfire.min.js scripts to index.html, declare 'firebase' as a module dependency in app.js, then create a rootRef service using a constant FirebaseUrl injected into the Firebase constructor. An Auth factory then injects rootRef and $firebaseAuth to return an authentication service usable across controllers via Angular's dependency injection. developers wiring up legacy AngularFire integrations can find setup walkthroughs like this on daily.dev."}}]}
```

