{"id":13507403,"url":"https://github.com/dwyl/elixir-auth-google","last_synced_at":"2025-10-21T19:01:26.187Z","repository":{"id":39717650,"uuid":"222402750","full_name":"dwyl/elixir-auth-google","owner":"dwyl","description":"👤Minimalist Google OAuth Authentication for Elixir Apps. Tested, Documented \u0026 Maintained. Setup in 5 mins. 🚀","archived":false,"fork":false,"pushed_at":"2025-03-09T08:51:19.000Z","size":2087,"stargazers_count":275,"open_issues_count":6,"forks_count":42,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-23T01:36:54.455Z","etag":null,"topics":["auth","authentication","elixir","google","google-api","oauth","oauth2"],"latest_commit_sha":null,"homepage":"https://github.com/dwyl/elixir-auth-google-demo","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dwyl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-18T08:47:52.000Z","updated_at":"2025-03-09T08:51:20.000Z","dependencies_parsed_at":"2023-11-13T20:27:08.772Z","dependency_job_id":"c419fc44-c6ce-4683-86e3-7dda783b0a8d","html_url":"https://github.com/dwyl/elixir-auth-google","commit_stats":{"total_commits":160,"total_committers":17,"mean_commits":9.411764705882353,"dds":0.5375,"last_synced_commit":"070ca4fc0206e7b8fcdaa182f97e48c587d7fba7"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwyl%2Felixir-auth-google","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwyl%2Felixir-auth-google/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwyl%2Felixir-auth-google/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwyl%2Felixir-auth-google/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwyl","download_url":"https://codeload.github.com/dwyl/elixir-auth-google/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246296325,"owners_count":20754623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth","authentication","elixir","google","google-api","oauth","oauth2"],"created_at":"2024-08-01T02:00:33.046Z","updated_at":"2025-10-21T19:01:25.738Z","avatar_url":"https://github.com/dwyl.png","language":"Elixir","readme":"\u003cdiv align=\"center\"\u003e\n\n# `elixir-auth-google`\n\nThe _easiest_ way to add Google OAuth authentication to your Elixir Apps.\n\n![sign-in-with-google-buttons](https://user-images.githubusercontent.com/194400/69637172-07a67900-1050-11ea-9e25-2b9e84a49d91.png)\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/dwyl/elixir-auth-google/ci.yml?label=build\u0026style=flat-square\u0026branch=main)\n[![codecov.io](https://img.shields.io/codecov/c/github/dwyl/elixir-auth-google/master.svg?style=flat-square)](http://codecov.io/github/dwyl/elixir-auth-google?branch=main)\n[![Hex.pm](https://img.shields.io/hexpm/v/elixir_auth_google?color=brightgreen\u0026style=flat-square)](https://hex.pm/packages/elixir_auth_google)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/dwyl/elixir-auth-google/issues)\n[![HitCount](http://hits.dwyl.com/dwyl/elixir-auth-google.svg)](http://hits.dwyl.com/dwyl/elixir-auth-google)\n\u003c!-- [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-brightgreen.svg?style=flat-square)](https://GitHub.com/TutorialsAndroid/GButton) --\u003e\n\n\u003c/div\u003e\n\n# _Why_? 🤷\n\nWe needed a **_much_ simpler**\nand **_extensively_ documented** way\nto add \"_**Sign-in** with **Google**_\"\ncapability to our Elixir App(s). \u003cbr /\u003e\n\n# _What_? 💭\n\nAn Elixir package that seamlessly handles\nGoogle OAuth2 Authentication/Authorization\nin as few steps as possible. \u003cbr /\u003e\nFollowing best practices for security \u0026 privacy\nand avoiding complexity\nby having sensible defaults for all settings.\n\n\n\u003e We built a lightweight solution\nthat only does _one_ thing\nand is easy for complete beginners to understand/use. \u003cbr /\u003e\nThere were already _several_ available options\nfor adding Google Auth to apps on\n[hex.pm/packages?search=google](https://hex.pm/packages?search=google) \u003cbr /\u003e\nthat all added _far_ too many implementation steps (complexity)\nand had incomplete docs (**`@doc false`**) and tests. \u003cbr /\u003e\ne.g:\n[github.com/googleapis/elixir-google-api](https://github.com/googleapis/elixir-google-api)\nwhich is a\n[\"_generated_\"](https://github.com/googleapis/elixir-google-api/blob/master/scripts/generate_client.sh)\nclient and is considered \"experimental\". \u003cbr /\u003e\nWe have drawn inspiration from several sources\nincluding code from other programming languages to build this package.\nThis result is _much_ simpler\nthan anything else\nand has both step-by-step instructions\nand a _complete working example_ App\nincluding how to encrypt tokens for secure storage\nto help you ship your app _fast_.\n\n\n# _Who_? 👥\n\nThis module is for people building apps using Elixir/Phoenix\nwho want to ship the \"Sign-in with Google\" feature _faster_\nand more maintainably.\n\nIt's targetted at _complete_ beginners\nwith no prior experience/knowledge\nof auth \"schemes\" or \"strategies\". \u003cbr /\u003e\nJust follow the detailed instructions\nand you'll be up-and running in 5 minutes.\n\n\n# _How_? ✅\n\nYou can add Google Authentication to your Elixir App\nusing **`elixir_auth_google`** \u003cbr /\u003e\nin under **5 minutes**\nby following these **5 _easy_ steps**:\n\n## 1. Add the hex package to `deps` 📦\n\nOpen your project's **`mix.exs`** file\nand locate the **`deps`** (dependencies) section. \u003cbr /\u003e\nAdd a line for **`:elixir_auth_google`** in the **`deps`** list:\n\n```elixir\ndef deps do\n  [\n    {:elixir_auth_google, \"~\u003e 1.6.9\"}\n  ]\nend\n```\n\nOnce you have added the line to your **`mix.exs`**,\nremember to run the **`mix deps.get`** command\nin your terminal\nto _download_ the dependencies.\n\n\n## 2. Create Google APIs Application OAuth2 Credentials 🆕\n\nCreate a Google Application if you don't already have one,\ngenerate the OAuth2 Credentials for the application\nand save the credentials as environment variables\naccessible by your app, or put them in your config file.\n\n\u003e **Note**: There are a few steps for creating a set of Google APIs credentials,\nso if you don't already have a Google App,\nwe created the following step-by-step guide\nto make it quick and _relatively_ painless:\n[create-google-app-guide.md](https://github.com/dwyl/elixir-auth-google/blob/master/create-google-app-guide.md) \u003cbr /\u003e\nDon't be intimidated by all the buzz-words;\nit's quite straightforward.\nAnd if you get stuck, ask for\n[help!](https://github.com/dwyl/elixir-auth-google/issues)\n\n\n## 3. Setup CLIENT_ID and CLIENT_SECRET in your project\n\nYou may either add those keys as environment variables or put them in the config:\n\n```\nexport GOOGLE_CLIENT_ID=631770888008-6n0oruvsm16kbkqg6u76p5cv5kfkcekt.apps.googleusercontent.com\nexport GOOGLE_CLIENT_SECRET=MHxv6-RGF5nheXnxh1b0LNDq\n```\nOr add the following in the config file:\n\n```elixir\nconfig :elixir_auth_google,\n  client_id: \"631770888008-6n0oruvsm16kbkqg6u76p5cv5kfkcekt.apps.googleusercontent.com\",\n  client_secret: \"MHxv6-RGF5nheXnxh1b0LNDq\"\n\n```\n\u003e ⚠️ Don't worry, these keys aren't valid.\nThey are just here for illustration purposes.\n\n\n## 4. Create a `GoogleAuthController` in your Project 📝\n\nCreate a new file called\n[`lib/app_web/controllers/google_auth_controller.ex`](https://github.com/dwyl/elixir-auth-google-demo/blob/master/lib/app_web/controllers/google_auth_controller.ex)\nand add the following code:\n\n```elixir\ndefmodule AppWeb.GoogleAuthController do\n  use AppWeb, :controller\n\n  @doc \"\"\"\n  `index/2` handles the callback from Google Auth API redirect.\n  \"\"\"\n  def index(conn, %{\"code\" =\u003e code}) do\n    {:ok, token} = ElixirAuthGoogle.get_token(code, MyAppWeb.Endpoint.url())\n    {:ok, profile} = ElixirAuthGoogle.get_user_profile(token.access_token)\n    conn\n    |\u003e put_view(AppWeb.PageView)\n    |\u003e render(:welcome, profile: profile)\n  end\nend\n```\nThis code does 3 things:\n+ Create a one-time auth `token` based on the response `code` sent by Google\nafter the person authenticates.\n+ Request the person's profile data from Google based on the `access_token`\n+ Render a `:welcome` view displaying some profile data\nto confirm that login with Google was successful.\n\n\n## 5. Create the `/auth/google/callback` Endpoint 📍\n\nOpen your **`router.ex`** file\nand locate the section that looks like `scope \"/\", AppWeb do`\n\nAdd the following line:\n\n```elixir\nget \"/auth/google/callback\", GoogleAuthController, :index\n```\n\nSample: [lib/app_web/router.ex#L20](https://github.com/dwyl/elixir-auth-google-demo/blob/4bb616dd134f498b84f079104c0f3345769517c4/lib/app_web/router.ex#L20)\n\n### Different callback url?\n\nYou can specify the env var\n\n```\nexport GOOGLE_CALLBACK_PATH=/myauth/google_callback\n```\n\nor add it in the configuration\n\nOr add the following in the config file:\n\n```elixir\nconfig :elixir_auth_google,\n  # ...\n  callback_path: \"/myauth/google_callback\"\n```\n\n## 6. Add the \"Login with Google\" Button to your Template ✨\n\nIn order to display the \"Sign-in with Google\" button in the UI,\nwe need to _generate_ the URL for the button in the relevant controller,\nand pass it to the template.\n\nOpen the `lib/app_web/controllers/page_controller.ex` file\nand update the `index` function:\n\nFrom:\n```elixir\ndef index(conn, _params) do\n  render(conn, \"index.html\")\nend\n```\n\nTo:\n```elixir\ndef index(conn, _params) do\n  oauth_google_url = ElixirAuthGoogle.generate_oauth_url(conn)\n  render(conn, \"index.html\",[oauth_google_url: oauth_google_url])\nend\n```\n\nYou can add extra features the the generated url by passing the state as a string,\nor any other query as a map of key/value pairs.\n\n```elixir\noauth_google_url = ElixirAuthGoogle.generate_oauth_url(conn, state)\n```\n\nWill result in Google Sign In link with `\u0026state=state` added.\nAnd something like:\n\n```elixir\noauth_google_url = ElixirAuthGoogle.generate_oauth_url(conn, %{lang: 'pt-BR'})\n```\n\nWill return a url with `lang=pt-BR` included in the sign in request.\n\n#### _Alternatively_ pass the `url` of your `App` into `generate_oauth_url/1`\n\nWe have noticed that on `fly.io` \nwhere the `Phoenix` App is proxied,\npassing the `conn` struct \nto `ElixirAuthGoogle.generate_oauth_url/2`\nis not effective.\nSee [dwyl/elixir-auth-google/issues/94](https://github.com/dwyl/elixir-auth-google/issues/94)\n\nSo we added an alternative way \nof invoking `generate_oauth_url/2`\npassing in the `url` of your `App`:\n\n```elixir\ndef index(conn, _params) do\n  base_url = MyAppWeb.Endpoint.url()\n  oauth_google_url = ElixirAuthGoogle.generate_oauth_url(base_url)\n  render(conn, \"index.html\",[oauth_google_url: oauth_google_url])\nend\n```\n\nThis uses \n[Phoenix.Endpoint.url/0](https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#c:url/0) \nwhich is available in any `Phoenix` App.\n\nJust remember to replace `MyAppWeb` with the name of your `App`. 😉\n\n\u003cbr /\u003e\n\n### 6.1 Update the `page/index.html.eex` Template\n\nOpen the `/lib/app_web/templates/page/index.html.eex` file\nand type the following code:\n\n```html\n\u003csection class=\"phx-hero\"\u003e\n  \u003ch1\u003eWelcome to Awesome App!\u003c/h1\u003e\n  \u003cp\u003eTo get started, login to your Google Account: \u003cp\u003e\n  \u003ca href={@oauth_google_url}\u003e\n    \u003cimg src=\"https://i.imgur.com/Kagbzkq.png\" alt=\"Sign in with Google\" /\u003e\n  \u003c/a\u003e\n\u003c/section\u003e\n```\n\n# _Done_! 🚀\n\nThe home page of the app now has a big \"Sign in with Google\" button:\n\n![sign-in-button](https://user-images.githubusercontent.com/194400/70202961-3c32c880-1713-11ea-9737-9121030ace06.png)\n\nWhen the person clicks the button,\nand authenticates with their Google Account,\nthey will be returned to your App\nwhere you can display a \"login success\" message:\n\n![welcome](https://user-images.githubusercontent.com/194400/70201692-494db880-170f-11ea-9776-0ffd1fdf5a72.png)\n\n\n### _Optional_: Scopes\n\nMost of the time you will only want/need\nthe person's email address and profile data\nwhen authenticating with your App.\nIn the cases where you need more specific access\nto a Google service, you will need to specify the exact scopes.\nSee:\nhttps://developers.google.com/identity/protocols/oauth2/scopes\n\nOnce you know the scope(s) your App needs access to,\nsimply define them using an environment variable, e.g:\n\n```\nGOOGLE_SCOPE=\"email contacts photoslibrary\"\n```\nThose double-quotes (`\"`) encapsulating the environment variable `String` are important. \nWithout them your system will only assign the first word to the `GOOGLE_SCOPE`.\ne.g: `email` and ignore the remaining scopes you need.\n***or*** you can set them as a config variable if you prefer:\n\n```\nconfig :elixir_auth_google,\n  :google_scope: \"email contacts photoslibrary\"\n```\n\nWith that configured, your App will gain access to the requested services\nonce the person authenticates/authorizes.\n\n\u003cbr /\u003e \u003cbr /\u003e\n\n\n## _Optimised_ SVG+CSS Button\n\nIn **step 6.1** above, we suggest using an `\u003cimg\u003e`\nfor the `Sign in with GitHub` button.\n\nBut even though this image appears small **`389 × 93 px`**\nhttps://i.imgur.com/Kagbzkq.png it is \"only\" **`8kb`**:\n\n![google-button-8kb](https://user-images.githubusercontent.com/194400/73607428-cd0c1000-45ad-11ea-8639-ffc3e9a0e0a2.png)\n\nWe could spend some time in a graphics editor optimising the image,\nbut we _know_ we can do better by using our `CSS` skills! 💡\n\n\u003e **Note**: This is the _official_ button provided by Google:\n[developers.google.com/identity/images/signin-assets.zip](developers.google.com/identity/images/signin-assets.zip) \u003cbr /\u003e\nSo if there was any optimisation they could squeeze out of it,\nthey probably would have done it before publishing the zip!\n\nThe following code re-creates the `\u003cimg\u003e`\nusing the GitHub logo **`SVG`**\nand `CSS` for layout/style:\n\n```html\n\u003cdiv style=\"display:flex; flex-direction:column; width:368px; margin-left:133px;\"\u003e\n  \u003clink href=\"https://fonts.googleapis.com/css?family=Roboto\u0026display=swap\"\u003e\n\n  \u003ca href=\"\u003c%= @oauth_google_url %\u003e\"\n    style=\"display:inline-flex; align-items:center; min-height:50px;\n      background-color:#4285F4; font-family:'Roboto',sans-serif;\n      font-size:28px; color:white; text-decoration:none;\n      margin-top: 12px\"\u003e\n      \u003cdiv style=\"background-color: white; margin:2px; padding-top:18px; padding-bottom:6px; min-height:59px; width:72px\"\u003e\n      \u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 533.5 544.3\"\n        width=\"52px\" height=\"35\" style=\"display:inline-flex; align-items:center;\" \u003e\n        \u003cpath d=\"M533.5 278.4c0-18.5-1.5-37.1-4.7-55.3H272.1v104.8h147c-6.1 33.8-25.7 63.7-54.4 82.7v68h87.7c51.5-47.4 81.1-117.4 81.1-200.2z\" fill=\"#4285f4\"/\u003e\n        \u003cpath d=\"M272.1 544.3c73.4 0 135.3-24.1 180.4-65.7l-87.7-68c-24.4 16.6-55.9 26-92.6 26-71 0-131.2-47.9-152.8-112.3H28.9v70.1c46.2 91.9 140.3 149.9 243.2 149.9z\" fill=\"#34a853\"/\u003e\n        \u003cpath d=\"M119.3 324.3c-11.4-33.8-11.4-70.4 0-104.2V150H28.9c-38.6 76.9-38.6 167.5 0 244.4l90.4-70.1z\" fill=\"#fbbc04\"/\u003e\n        \u003cpath d=\"M272.1 107.7c38.8-.6 76.3 14 104.4 40.8l77.7-77.7C405 24.6 339.7-.8 272.1 0 169.2 0 75.1 58 28.9 150l90.4 70.1c21.5-64.5 81.8-112.4 152.8-112.4z\" fill=\"#ea4335\"/\u003e\n      \u003c/svg\u003e\n    \u003c/div\u003e\n    \u003cdiv style=\"margin-left: 27px;\"\u003e\n      Sign in with Google\n    \u003c/div\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n```\n\n\u003e We created this from scratch using the SVG of the Google logo\nand some basic CSS. \u003cbr /\u003e\nFor the \"making of\" journey see:\nhttps://github.com/dwyl/elixir-auth-google/issues/25\n\nThe result looks _better_ than the `\u003cimg\u003e` button:\n\n![img-vs-svg-8kb-1kb](https://user-images.githubusercontent.com/194400/73607841-54a84d80-45b3-11ea-9d0c-a81005a0bfde.png)\n\nIt can be scaled to any screen size so it will _always_ look great! \u003cbr /\u003e\nUsing http://bytesizematters.com we see that our SVG+CSS button is only **`1kb`**:\n![bytesize-matters-google-button](https://user-images.githubusercontent.com/194400/73607378-4fe09b00-45ad-11ea-9ab1-3b383c1d4516.png)\n\n\nThat is an **87.5%** bandwidth saving\non the **`8kb`** of the\n[**`.png`** button](https://github.com/dwyl/elixir-auth-google/issues/25).\nAnd what's _more_ it reduces the number of HTTP requests\nwhich means the page loads _even_ faster.\n\nThis is used in the Demo app:\n[`lib/app_web/templates/page/index.html.eex`](https://github.com/dwyl/elixir-auth-google-demo/blob/4fdbeada2f13f4dd27d2372a916764ec7aad24e7/lib/app_web/templates/page/index.html.eex#L5-L26)\n\n\n### `i18n`\n\nThe _biggest_ advantage of having an SVG+CSS button\nis that you can _translate_ the button text! \u003cbr /\u003e\nSince the text/copy of the button is now _just_ text in standard HTML,\nthe user's web browser can _automatically_ translate it! \u003cbr /\u003e\ne.g: _French_ 🇬🇧 \u003e 🇫🇷\n\n![google-login-french-translation](https://user-images.githubusercontent.com/194400/73607961-c03eea80-45b4-11ea-9840-5d5f02ff8a13.png)\n\nThis is _much_ better UX for the **80%** of people in the world\nwho do _not_ speak English _fluently_.\nThe _single_ biggest engine for growth in startup companies\nis [_translating_](https://youtu.be/T9ikpoF2GH0?t=463)\ntheir user interface into more languages.\nObviously don't focus on translations\nwhile you're building your MVP,\nbut if it's no extra _work_\nto use this SVG+CSS button\nand it means the person's web browser\ncan _automatically_ localise your App!\n\n### _Accessibility_\n\nThe `SVG+CSS` button is more accessible than the image.\nEven thought the `\u003cimg\u003e` had an `alt` attribute\nwhich is a lot better than nothing,\nthe `SVG+CSS` button can be re-interpreted\nby a non-screen device and more easily transformed.\n\n\n\u003cbr /\u003e \u003cbr /\u003e\n\n## _Even_ More Detail 💡\n\nIf you want to dive a bit deeper into _understanding_ how this package works,\nYou can read and grok the code in under 10 minutes:\n[`/lib/elixir_auth_google.ex`](https://github.com/dwyl/elixir-auth-google/blob/master/lib/elixir_auth_google.ex)\n\nWe created a _basic_ demo Phoenix App,\nto show you _exactly_ how you can implement\nthe **`elixir_auth_google`** package:\nhttps://github.com/dwyl/elixir-auth-google-demo\nIt's deployed to Heroku: https://elixir-auth-google-demo.herokuapp.com \u003cbr /\u003e\n(_no data is saved so you can play with it - and try to break it!_)\n\nAnd if you want/need a more complete real-world example\nincluding creating sessions and saving profile data to a database,\ntake a look at our MVP:\nhttps://github.com/dwyl/app-mvp-phoenix\n\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n## Notes 📝\n\n+ Official Docs for Google Identity Platform:\nhttps://developers.google.com/identity/choose-auth\n  + Web specific sample code (JS):\n  https://developers.google.com/identity/sign-in/web\n+ Google Sign-In for server-side apps:\nhttps://developers.google.com/identity/sign-in/web/server-side-flow\n+ Using OAuth 2.0 for Web Server Applications:\nhttps://developers.google.com/identity/protocols/OAuth2WebServer\n+ Google Auth Branding Guidelines:\nhttps://developers.google.com/identity/branding-guidelines \u003cbr /\u003e\nOnly two colors are permitted for the button:\n**white** `#FFFFFF` and **blue** `#4285F4`\n\n![two-colors-of-google-auth-button](https://user-images.githubusercontent.com/194400/69634312-d9be3600-1049-11ea-9354-cdaa53f5c42b.png)\n\n\n### Fun Facts 📈📊\n\nUnlike other \"social media\" companies,\nGoogle/Alphabet does not report it's\n_Monthly_ Active Users (MAUs)\nor _Daily_ Active Users (DAUs)\nhowever they do release stats in drips\nin their Google IO or YouTube events.\nThe following is a quick list of facts\nthat make adding Google Auth to your App\na compelling business case:\n\n+ As of May 2019, there are over\n[2.5 Billion](https://www.theverge.com/2019/5/7/18528297/google-io-2019-android-devices-play-store-total-number-statistic-keynote)\n_active_ Android devices;\n[87%](https://www.idc.com/promo/smartphone-market-share/os) global market share.\nAll these people have Google Accounts in order to use Google services.\n+ YouTube has\n[2 billion](https://www.businessofapps.com/data/youtube-statistics/)\nmonthly active YouTube users (_signed in with a Google Account_).\n+ Gmail has\n[1.5 Billion](https://www.thenewsminute.com/article/googles-gmail-turns-15-now-has-over-15-billion-monthly-active-users-99275)\nmonthly active users a\n[27% share](https://seotribunal.com/blog/google-stats-and-facts)\n of the global email client market.\n+ [65%](https://techjury.net/stats-about/gmail-statistics)\nof Small and Medium sized businesses use Google Apps for business.\n+ [90%+](https://techjury.net/stats-about/gmail-statistics)\nof startups use Gmail. This is a good _proxy_ for \"early adopters\".\n+ [68%](https://eu.azcentral.com/story/opinion/op-ed/joannaallhands/2017/10/09/google-classroom-changing-teachers-students-education/708246001/)\nof schools in the US use Google Classroom and related G-suite products. \u003cbr /\u003e\nSo the _next_ generation of internet/app users have Google accounts.\n+ Google has\n[90.46%](https://seotribunal.com/blog/google-stats-and-facts/)\nof the search engine market share worldwide. 95.4% on Mobile.\n\nOf the 4.5 billion internet users (58% of the world population),\naround 3.2 billion (72%) have a Google account.\n90%+ of tech \"early adopters\" use Google Apps\nwhich means that adding Google OAuth Sign-in\nis the _logical_ choice for _most_ Apps.\n\n### Privacy Concerns? 🔐\n\nA _common misconception_ is that adding Google Auth Sign-in\nsends a user's application data to Google.\nThis is **`false`** and App developers have 100% control\nover what data is sent to (stored by) Google.\nAn App can use Google Auth to _authenticate_ a person\n(_identify them and get read-only access\n  to their personal details like **first name** and **email address**_)\nwithout sending any data to Google.\nYes, it will mean that Google \"knows\" that the person is _using_ your App,\nbut it will not give Google any insight into _how_ they are using it\nor what types of data they are storing in the App. Privacy is maintained.\nSo if you use the @dwyl app to plan your wedding or next holiday,\nGoogle will not have _any_ of that data\nand will not serve any annoying ads based on your project/plans.\n","funding_links":[],"categories":["Authentication"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwyl%2Felixir-auth-google","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwyl%2Felixir-auth-google","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwyl%2Felixir-auth-google/lists"}