{"_id":"@bookpeazy/firebaseui","_rev":"4-548f01772176b3f5577896c19584629d","name":"@bookpeazy/firebaseui","dist-tags":{"latest":"6.0.4-rc.4"},"versions":{"6.0.2":{"name":"@bookpeazy/firebaseui","version":"6.0.2","description":"Javascript library for customizable UI on top of Firebase SDK","main":"./dist/npm.js","module":"./dist/esm.js","types":"./dist/index.d.ts","style":"dist/firebaseui.css","scripts":{"build":"gulp","build-all":"gulp build-all","build-soy":"gulp build-soy","demo":"npm run build && ./buildtools/run_demo.sh","test":"npm run build && npm run generate-test-files && ./buildtools/run_tests.sh","serve":"npm run build && npm run generate-test-files && gulp serve","generate-test-files":"./buildtools/generate_test_files.sh","prepublish":"npm run test && cp -r dist demo/public"},"test":"npm run test","author":{"name":"Google"},"repository":{"type":"git","url":"git+https://github.com/firebase/firebaseui-web.git"},"license":"Apache-2.0","devDependencies":{"closure-builder":"^2.3.7","firebase":"^9.13.0","firebase-tools":"^9.3.0","fs-extra":"^3.0.1","google-closure-compiler":"^20190415.0.0","google-closure-deps":"^20210406.0.0","google-closure-library":"^20190415.0.0","google-closure-templates":"^20150410.0.0","gulp":"^4.0.2","gulp-clean-css":"^4.3.0","gulp-closure-compiler":"^0.4.0","gulp-concat-css":"^3.1.0","gulp-connect":"^5.5.0","gulp-css-flip":"^0.4.0","gulp-css-inline-images":"^0.1.1","gulp-sass":"^5.0.0","gulp-util":"^3.0.7","protractor":"^7.0.0","sass":"^1.49.7","streamqueue":"^1.1.1","webdriver-manager":"^12.1.8"},"dependencies":{"dialog-polyfill":"^0.4.7","material-design-lite":"^1.2.0"},"peerDependencies":{"firebase":"^9.1.3"},"gitHead":"4da263911287d121d4d52a34ef1bd340ffb90122","bugs":{"url":"https://github.com/firebase/firebaseui-web/issues"},"homepage":"https://github.com/firebase/firebaseui-web#readme","_id":"@bookpeazy/firebaseui@6.0.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-Et5wBXVAkfvlSpncAzoidIiVPGlAH0B9XxqO+ydvvrjH46OsZUeoe2/MfVsXmSqUnh96zNoWs7Oq6blhEBdh8Q==","shasum":"f9d189994f44a3a1119ad81182ac1a84fe834186","tarball":"https://registry.npmjs.org/@bookpeazy/firebaseui/-/firebaseui-6.0.2.tgz","fileCount":9,"unpackedSize":833293,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG/4YQ3T26mZE34BBYWZeNTNNi9LDRTryoQB8PP25DGqAiB1HgWXCznwNAOGqoY+3/+ImbHvlMESLbJl9RaO3avM7A=="}]},"_npmUser":{"name":"devzacx","email":"zachlowden1@gmail.com"},"directories":{},"maintainers":[{"name":"devzacx","email":"zachlowden1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/firebaseui_6.0.2_1684885551345_0.5658016444007261"},"_hasShrinkwrap":false},"6.0.3-rc.1":{"name":"@bookpeazy/firebaseui","version":"6.0.3-rc.1","description":"Javascript library for customizable UI on top of Firebase SDK","main":"./dist/npm.js","module":"./dist/esm.js","types":"./dist/index.d.ts","style":"dist/firebaseui.css","scripts":{"build":"gulp","build-all":"gulp build-all","build-soy":"gulp build-soy","demo":"npm run build && ./buildtools/run_demo.sh","test":"npm run build && npm run generate-test-files && ./buildtools/run_tests.sh","serve":"npm run build && npm run generate-test-files && gulp serve","generate-test-files":"./buildtools/generate_test_files.sh","prepublish":"npm run test && cp -r dist demo/public"},"test":"npm run test","author":{"name":"Google"},"repository":{"type":"git","url":"git+https://github.com/firebase/firebaseui-web.git"},"license":"Apache-2.0","devDependencies":{"closure-builder":"^2.3.7","firebase":"^9.13.0","firebase-tools":"^9.3.0","fs-extra":"^3.0.1","google-closure-compiler":"^20190415.0.0","google-closure-deps":"^20210406.0.0","google-closure-library":"^20190415.0.0","google-closure-templates":"^20150410.0.0","gulp":"^4.0.2","gulp-clean-css":"^4.3.0","gulp-closure-compiler":"^0.4.0","gulp-concat-css":"^3.1.0","gulp-connect":"^5.5.0","gulp-css-flip":"^0.4.0","gulp-css-inline-images":"^0.1.1","gulp-sass":"^5.0.0","gulp-util":"^3.0.7","protractor":"^7.0.0","sass":"^1.49.7","streamqueue":"^1.1.1","webdriver-manager":"^12.1.8"},"dependencies":{"dialog-polyfill":"^0.4.7","material-design-lite":"^1.2.0"},"peerDependencies":{"firebase":"^9.1.3"},"gitHead":"4da263911287d121d4d52a34ef1bd340ffb90122","bugs":{"url":"https://github.com/firebase/firebaseui-web/issues"},"homepage":"https://github.com/firebase/firebaseui-web#readme","_id":"@bookpeazy/firebaseui@6.0.3-rc.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-rFUT4p4I/pgcqfF+dovNPIQbxRDBq8hnXeXndhsyJhL89xLA2MJQtZcIBpkDYiKtOzoiY4ldNVOWfIC9KjrMcA==","shasum":"e3fc98311c5048eeb994b5c62c4601be76b85d9f","tarball":"https://registry.npmjs.org/@bookpeazy/firebaseui/-/firebaseui-6.0.3-rc.1.tgz","fileCount":9,"unpackedSize":833460,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDnVBGLJLyKI55C7zj6fWF2euyMH9zxCxldxTGvWO1UvAiEA8qC1MTl4Sor8JrqEiUEs3O7R8CLrgLeMEvQ4f/J417s="}]},"_npmUser":{"name":"devzacx","email":"zachlowden1@gmail.com"},"directories":{},"maintainers":[{"name":"devzacx","email":"zachlowden1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/firebaseui_6.0.3-rc.1_1684886188801_0.30656369572565745"},"_hasShrinkwrap":false},"6.0.4-rc.2":{"name":"@bookpeazy/firebaseui","version":"6.0.4-rc.2","description":"Javascript library for customizable UI on top of Firebase SDK","main":"./dist/npm.js","module":"./dist/esm.js","types":"./dist/index.d.ts","style":"dist/firebaseui.css","scripts":{"build":"gulp","build-all":"gulp build-all","build-soy":"gulp build-soy","demo":"npm run build && ./buildtools/run_demo.sh","test":"npm run build && npm run generate-test-files && ./buildtools/run_tests.sh","serve":"npm run build && npm run generate-test-files && gulp serve","generate-test-files":"./buildtools/generate_test_files.sh","prepublish":"npm run test && cp -r dist demo/public"},"test":"npm run test","author":{"name":"Google"},"repository":{"type":"git","url":"git+https://github.com/firebase/firebaseui-web.git"},"license":"Apache-2.0","devDependencies":{"closure-builder":"^2.3.7","firebase":"^9.13.0","firebase-tools":"^9.3.0","fs-extra":"^3.0.1","google-closure-compiler":"^20190415.0.0","google-closure-deps":"^20210406.0.0","google-closure-library":"^20190415.0.0","google-closure-templates":"^20150410.0.0","gulp":"^4.0.2","gulp-clean-css":"^4.3.0","gulp-closure-compiler":"^0.4.0","gulp-concat-css":"^3.1.0","gulp-connect":"^5.5.0","gulp-css-flip":"^0.4.0","gulp-css-inline-images":"^0.1.1","gulp-sass":"^5.0.0","gulp-util":"^3.0.7","protractor":"^7.0.0","sass":"^1.49.7","streamqueue":"^1.1.1","webdriver-manager":"^12.1.8"},"dependencies":{"dialog-polyfill":"^0.4.7","material-design-lite":"^1.2.0"},"peerDependencies":{"firebase":"^9.1.3"},"gitHead":"4da263911287d121d4d52a34ef1bd340ffb90122","bugs":{"url":"https://github.com/firebase/firebaseui-web/issues"},"homepage":"https://github.com/firebase/firebaseui-web#readme","_id":"@bookpeazy/firebaseui@6.0.4-rc.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-Cu5U11yY+Y71dKSe0+YwRMkcFX1jpUVFV7gQQ4xmEFJdica6LyM+a191GtxU2ITj5FI7pW1yxzrApT8D7UzSxg==","shasum":"a883e9388395cc7bfed77ded1de84ffa6e695a82","tarball":"https://registry.npmjs.org/@bookpeazy/firebaseui/-/firebaseui-6.0.4-rc.2.tgz","fileCount":9,"unpackedSize":833565,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJdaoz1FyPzDXpH3dEiozQlK/nD//mTbPUP8E/I9e0rgIhAP+SfzSx6eUZDyoDyFO8yCi2j15LPKFDMSGZzrqkFggd"}]},"_npmUser":{"name":"devzacx","email":"zachlowden1@gmail.com"},"directories":{},"maintainers":[{"name":"devzacx","email":"zachlowden1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/firebaseui_6.0.4-rc.2_1684887465046_0.6980290995455014"},"_hasShrinkwrap":false},"6.0.4-rc.3":{"name":"@bookpeazy/firebaseui","version":"6.0.4-rc.3","description":"Javascript library for customizable UI on top of Firebase SDK","main":"./dist/npm.js","module":"./dist/esm.js","types":"./dist/index.d.ts","style":"dist/firebaseui.css","scripts":{"build":"gulp","build-all":"gulp build-all","build-soy":"gulp build-soy","demo":"npm run build && ./buildtools/run_demo.sh","test":"npm run build && npm run generate-test-files && ./buildtools/run_tests.sh","serve":"npm run build && npm run generate-test-files && gulp serve","generate-test-files":"./buildtools/generate_test_files.sh","prepublish":"npm run test && cp -r dist demo/public"},"test":"npm run test","author":{"name":"Google"},"repository":{"type":"git","url":"git+https://github.com/firebase/firebaseui-web.git"},"license":"Apache-2.0","devDependencies":{"closure-builder":"^2.3.7","firebase":"^9.13.0","firebase-tools":"^9.3.0","fs-extra":"^3.0.1","google-closure-compiler":"^20190415.0.0","google-closure-deps":"^20210406.0.0","google-closure-library":"^20190415.0.0","google-closure-templates":"^20150410.0.0","gulp":"^4.0.2","gulp-clean-css":"^4.3.0","gulp-closure-compiler":"^0.4.0","gulp-concat-css":"^3.1.0","gulp-connect":"^5.5.0","gulp-css-flip":"^0.4.0","gulp-css-inline-images":"^0.1.1","gulp-sass":"^5.0.0","gulp-util":"^3.0.7","protractor":"^7.0.0","sass":"^1.49.7","streamqueue":"^1.1.1","webdriver-manager":"^12.1.8"},"dependencies":{"dialog-polyfill":"^0.4.7","material-design-lite":"^1.2.0"},"peerDependencies":{"firebase":"^9.1.3"},"gitHead":"4da263911287d121d4d52a34ef1bd340ffb90122","bugs":{"url":"https://github.com/firebase/firebaseui-web/issues"},"homepage":"https://github.com/firebase/firebaseui-web#readme","_id":"@bookpeazy/firebaseui@6.0.4-rc.3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-a1Nf4o5FwTmj8TAsWHfLd8EZBZrQj+3BfydpcnJT1fWUW/QRmagYkOkeUebuJlb8QoQi0ldt20mlB1PP3ao/jg==","shasum":"24b94af3f92da4a8a8f0726fdeb55cffbb86a9ba","tarball":"https://registry.npmjs.org/@bookpeazy/firebaseui/-/firebaseui-6.0.4-rc.3.tgz","fileCount":9,"unpackedSize":833537,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPqovccXi71irOTly3VeYxSzHizBPwkFGduoXMlhAt0QIgdoka9GynlPkAE8AmGMs3N1tqq/XfGDoZ0VZK/9fncIc="}]},"_npmUser":{"name":"devzacx","email":"zachlowden1@gmail.com"},"directories":{},"maintainers":[{"name":"devzacx","email":"zachlowden1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/firebaseui_6.0.4-rc.3_1684888137974_0.5518455689442654"},"_hasShrinkwrap":false},"6.0.4-rc.4":{"name":"@bookpeazy/firebaseui","version":"6.0.4-rc.4","description":"Javascript library for customizable UI on top of Firebase SDK","main":"./dist/npm.js","module":"./dist/esm.js","types":"./dist/index.d.ts","style":"dist/firebaseui.css","scripts":{"build":"gulp","build-all":"gulp build-all","build-soy":"gulp build-soy","demo":"npm run build && ./buildtools/run_demo.sh","test":"npm run build && npm run generate-test-files && ./buildtools/run_tests.sh","serve":"npm run build && npm run generate-test-files && gulp serve","generate-test-files":"./buildtools/generate_test_files.sh","prepublish":"npm run test && cp -r dist demo/public"},"test":"npm run test","author":{"name":"Google"},"repository":{"type":"git","url":"git+https://github.com/firebase/firebaseui-web.git"},"license":"Apache-2.0","devDependencies":{"closure-builder":"^2.3.7","firebase":"^9.13.0","firebase-tools":"^9.3.0","fs-extra":"^3.0.1","google-closure-compiler":"^20190415.0.0","google-closure-deps":"^20210406.0.0","google-closure-library":"^20190415.0.0","google-closure-templates":"^20150410.0.0","gulp":"^4.0.2","gulp-clean-css":"^4.3.0","gulp-closure-compiler":"^0.4.0","gulp-concat-css":"^3.1.0","gulp-connect":"^5.5.0","gulp-css-flip":"^0.4.0","gulp-css-inline-images":"^0.1.1","gulp-sass":"^5.0.0","gulp-util":"^3.0.7","protractor":"^7.0.0","sass":"^1.49.7","streamqueue":"^1.1.1","webdriver-manager":"^12.1.8"},"dependencies":{"dialog-polyfill":"^0.4.7","material-design-lite":"^1.2.0"},"peerDependencies":{"firebase":"^9.1.3"},"gitHead":"4da263911287d121d4d52a34ef1bd340ffb90122","bugs":{"url":"https://github.com/firebase/firebaseui-web/issues"},"homepage":"https://github.com/firebase/firebaseui-web#readme","_id":"@bookpeazy/firebaseui@6.0.4-rc.4","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-Y9o0SlsvOFqlv8WbqU7bkF9A1p01ACmcipQ7nPNWwTQK8Cb6xAToovRsc82Y0FjTcYCkHR5FFk+La2Ivm0o0vA==","shasum":"edd07fb8b83da4dd11af4f93915865d917b5c048","tarball":"https://registry.npmjs.org/@bookpeazy/firebaseui/-/firebaseui-6.0.4-rc.4.tgz","fileCount":9,"unpackedSize":833271,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD01roKcMik6oVC/QYPJICoep1Pg+G7cQdFU8LXX7xLrAIhAIsV4xrc6NaNm9qh2f7sjbzkJi+EnhkE29p97+5ZY/zX"}]},"_npmUser":{"name":"devzacx","email":"zachlowden1@gmail.com"},"directories":{},"maintainers":[{"name":"devzacx","email":"zachlowden1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/firebaseui_6.0.4-rc.4_1684889424744_0.42232286331949354"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-23T23:45:51.276Z","6.0.2":"2023-05-23T23:45:51.545Z","modified":"2023-05-24T00:50:25.119Z","6.0.3-rc.1":"2023-05-23T23:56:28.999Z","6.0.4-rc.2":"2023-05-24T00:17:45.460Z","6.0.4-rc.3":"2023-05-24T00:28:58.365Z","6.0.4-rc.4":"2023-05-24T00:50:24.980Z"},"maintainers":[{"name":"devzacx","email":"zachlowden1@gmail.com"}],"description":"Javascript library for customizable UI on top of Firebase SDK","homepage":"https://github.com/firebase/firebaseui-web#readme","repository":{"type":"git","url":"git+https://github.com/firebase/firebaseui-web.git"},"author":{"name":"Google"},"bugs":{"url":"https://github.com/firebase/firebaseui-web/issues"},"license":"Apache-2.0","readme":"[![Build Status](https://travis-ci.org/firebase/firebaseui-web.svg?branch=master)](https://travis-ci.org/firebase/firebaseui-web)\n\n# FirebaseUI for Web — Auth\n\nFirebaseUI is an open-source JavaScript library for Web that provides simple,\ncustomizable UI bindings on top of [Firebase](https://firebase.google.com) SDKs\nto eliminate boilerplate code and promote best practices.\n\nFirebaseUI Auth provides a drop-in auth solution that handles the UI flows for\nsigning in users with email addresses and passwords, phone numbers, Identity\nProvider Sign In including Google, Facebook, GitHub, Twitter, Apple, Microsoft,\nYahoo, OpenID Connect (OIDC) providers and SAML providers. It is built on top of\n[Firebase Auth](https://firebase.google.com/docs/auth).\n\nThe FirebaseUI component implements best practices for authentication on mobile\ndevices and websites, helping to sign-in and sign-up conversion for your app. It\nalso handles cases like account recovery and account linking that can be\nsecurity sensitive and error-prone to handle.\n\nFirebaseUI Auth clients are also available for\n[iOS](https://github.com/firebase/firebaseui-ios) and\n[Android](https://github.com/firebase/firebaseui-android).\n\nFirebaseUI fully supports all recent browsers. Signing in with federated\nproviders (Google, Facebook, Twitter, GitHub, Apple, Microsoft, Yahoo, OIDC,\nSAML) is also supported in Cordova/Ionic environments. Additional non-browser\nenvironments(React Native...) or Chrome extensions will be added once the\nunderlying Firebase core SDK supports them in a way that is compatible with\nFirebaseUI.\n\n## Table of Contents\n\n1. [Demo](#demo)\n2. [Installation](#installation)\n3. [Usage instructions](#using-firebaseui-for-authentication)\n4. [Configuration](#configuration)\n5. [Customization](#customizing-firebaseui-for-authentication)\n6. [Advanced](#advanced)\n7. [Developer Setup](#developer-setup)\n8. [IAP External Identities Support with FirebaseUI](#iap-external-identities-support-with-firebaseui)\n9. [Cordova Setup](#cordova-setup)\n10. [React DOM Setup](#react-dom-setup)\n11. [Angular Setup](#angular-setup)\n12. [Known issues](#known-issues)\n13. [Deprecated APIs](#deprecated-apis)\n14. [Release Notes](#release-notes)\n\n## Demo\n\nAccessible here:\n[https://fir-ui-demo-84a6c.firebaseapp.com](https://fir-ui-demo-84a6c.firebaseapp.com).\n\n<p align=\"center\">\n  <img src=\"demo/screenshot.png\" width=\"300\" title=\"Screenshot\">\n</p>\n\n## Installation\n\n### Option 1: CDN\n\nYou just need to include the following script and CSS file in the `<head>` tag\nof your page, below the initialization snippet from the Firebase Console:\n\n```html\n<script src=\"https://www.gstatic.com/firebasejs/ui/6.0.2/firebase-ui-auth.js\"></script>\n<link type=\"text/css\" rel=\"stylesheet\" href=\"https://www.gstatic.com/firebasejs/ui/6.0.2/firebase-ui-auth.css\" />\n```\n\n#### Localized Widget\n\nLocalized versions of the widget are available through the CDN. To use a\nlocalized widget, load the localized JS library instead of the default library:\n\n```html\n<script src=\"https://www.gstatic.com/firebasejs/ui/6.0.2/firebase-ui-auth__{LANGUAGE_CODE}.js\"></script>\n<link type=\"text/css\" rel=\"stylesheet\" href=\"https://www.gstatic.com/firebasejs/ui/6.0.2/firebase-ui-auth.css\" />\n```\n\nwhere `{LANGUAGE_CODE}` is replaced by the code of the language you want. For example, the French\nversion of the library is available at\n`https://www.gstatic.com/firebasejs/ui/6.0.2/firebase-ui-auth__fr.js`. The list of available\nlanguages and their respective language codes can be found at [LANGUAGES.md](LANGUAGES.md).\n\nRight-to-left languages also require the right-to-left version of the stylesheet, available at\n`https://www.gstatic.com/firebasejs/ui/6.0.2/firebase-ui-auth-rtl.css`, instead of the default\nstylesheet. The supported right-to-left languages are Arabic (ar), Farsi (fa), and Hebrew (iw).\n\n### Option 2: npm Module\n\nInstall FirebaseUI and its peer-dependency Firebase via npm using the following\ncommands:\n\n```bash\n$ npm install firebase firebaseui --save\n```\n\nYou can then `import` the following modules within your source files:\n\n```javascript\nimport firebase from 'firebase/compat/app';\nimport * as firebaseui from 'firebaseui'\nimport 'firebaseui/dist/firebaseui.css'\n```\n\n### Option 3: Bower component\n\nInstall FirebaseUI and its dependencies via Bower using the following command:\n\n```bash\n$ bower install firebaseui --save\n```\n\nYou can then include the required files in your HTML, if your HTTP Server serves\nthe files within `bower_components/`:\n\n```html\n<script src=\"bower_components/firebaseui/dist/firebaseui.js\"></script>\n<link type=\"text/css\" rel=\"stylesheet\" href=\"bower_components/firebaseui/dist/firebaseui.css\" />\n```\n\n## Using FirebaseUI for Authentication\n\nFirebaseUI includes the following flows:\n\n1. Interaction with Identity Providers such as Google and Facebook\n2. Phone number based authentication\n3. Sign-up and sign-in with email accounts (email/password and email link)\n4. Password reset\n5. Prevention of account duplication (activated when\n*\"One account per email address\"* setting is enabled in the\n[Firebase console](https://console.firebase.google.com). This setting is enabled\nby default.)\n6. Integration with\n[one-tap sign-up](https://developers.google.com/identity/one-tap/web/)\n7. Ability to upgrade anonymous users through sign-in/sign-up.\n8. Sign-in as a guest\n\n### Configuring sign-in providers\n\nTo use FirebaseUI to authenticate users you first need to configure each\nprovider you want to use in their own developer app settings. Please read the\n*Before you begin* section of Firebase Authentication at the following links:\n\n- [Phone number](https://firebase.google.com/docs/auth/web/phone-auth)\n- [Email and password](https://firebase.google.com/docs/auth/web/password-auth#before_you_begin)\n- [Google](https://firebase.google.com/docs/auth/web/google-signin#before_you_begin)\n- [Facebook](https://firebase.google.com/docs/auth/web/facebook-login#before_you_begin)\n- [Twitter](https://firebase.google.com/docs/auth/web/twitter-login#before_you_begin)\n- [Github](https://firebase.google.com/docs/auth/web/github-auth#before_you_begin)\n- [Anonymous](https://firebase.google.com/docs/auth/web/anonymous-auth#before_you_begin)\n- [Email link](https://firebase.google.com/docs/auth/web/email-link-auth#before_you_begin)\n- [Apple](https://firebase.google.com/docs/auth/web/apple)\n- [Microsoft](https://firebase.google.com/docs/auth/web/microsoft-oauth)\n- [Yahoo](https://firebase.google.com/docs/auth/web/yahoo-oauth)\n\nFor [Google Cloud's Identity Platform (GCIP)](https://cloud.google.com/identity-cp/)\ndevelopers, you can also enable SAML and OIDC providers following the\ninstructions:\n\n- [SAML](https://cloud.google.com/identity-cp/docs/how-to-enable-application-for-saml)\n- [OIDC](https://cloud.google.com/identity-cp/docs/how-to-enable-application-for-oidc)\n\n### Starting the sign-in flow\n\nYou first need to initialize your\n[Firebase app](https://firebase.google.com/docs/web/setup). The\n`firebase.auth.Auth` instance should be passed to the constructor of\n`firebaseui.auth.AuthUI`. You can then call the `start` method with the CSS\nselector that determines where to create the widget, and a configuration object.\n\nThe following example shows how to set up a sign-in screen with all supported\nproviders. Please refer to the [demo application in the examples folder](demo/)\nfor a more in-depth example, showcasing a Single Page Application mode.\n\n> Firebase and FirebaseUI do not work when executed directly from a file (i.e.\n> opening the file in your browser, not through a web server). Always run\n> `firebase serve` (or your preferred local server) to test your app locally.\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"UTF-8\">\n    <title>Sample FirebaseUI App</title>\n    <script src=\"https://www.gstatic.com/firebasejs/9.13.0/firebase-app-compat.js\"></script>\n    <script src=\"https://www.gstatic.com/firebasejs/9.13.0/firebase-auth-compat.js\"></script>\n    <!-- *******************************************************************************************\n       * TODO(DEVELOPER): Paste the initialization snippet from this dialog box:\n       * Firebase Console > Project Settings > Add App > Web.\n       ***************************************************************************************** -->\n    <script src=\"https://www.gstatic.com/firebasejs/ui/6.0.2/firebase-ui-auth.js\"></script>\n    <link type=\"text/css\" rel=\"stylesheet\" href=\"https://www.gstatic.com/firebasejs/ui/6.0.2/firebase-ui-auth.css\" />\n    <script type=\"text/javascript\">\n      // FirebaseUI config.\n      var uiConfig = {\n        signInSuccessUrl: '<url-to-redirect-to-on-success>',\n        signInOptions: [\n          // Leave the lines as is for the providers you want to offer your users.\n          firebase.auth.GoogleAuthProvider.PROVIDER_ID,\n          firebase.auth.FacebookAuthProvider.PROVIDER_ID,\n          firebase.auth.TwitterAuthProvider.PROVIDER_ID,\n          firebase.auth.GithubAuthProvider.PROVIDER_ID,\n          firebase.auth.EmailAuthProvider.PROVIDER_ID,\n          firebase.auth.PhoneAuthProvider.PROVIDER_ID,\n          firebaseui.auth.AnonymousAuthProvider.PROVIDER_ID\n        ],\n        // tosUrl and privacyPolicyUrl accept either url string or a callback\n        // function.\n        // Terms of service url/callback.\n        tosUrl: '<your-tos-url>',\n        // Privacy policy url/callback.\n        privacyPolicyUrl: function() {\n          window.location.assign('<your-privacy-policy-url>');\n        }\n      };\n\n      // Initialize the FirebaseUI Widget using Firebase.\n      var ui = new firebaseui.auth.AuthUI(firebase.auth());\n      // The start method will wait until the DOM is loaded.\n      ui.start('#firebaseui-auth-container', uiConfig);\n    </script>\n  </head>\n  <body>\n    <!-- The surrounding HTML is left untouched by FirebaseUI.\n         Your app may use that space for branding, controls and other customizations.-->\n    <h1>Welcome to My Awesome App</h1>\n    <div id=\"firebaseui-auth-container\"></div>\n  </body>\n</html>\n```\n\n**This is only relevant for single page apps or apps where the sign-in UI is\nrendered conditionally (e.g. button click)**\n\nWhen redirecting back from Identity Providers like Google\nand Facebook or email link sign-in, `start()` method needs to be called to\nfinish the sign-in flow.\nIf it requires a user interaction to start the initial sign-in process, you need\nto check if there is a pending redirect operation going on on page load to check\nwhether `start()` needs to be called.\n\nTo check if there is a pending redirect operation to complete a sign-in attempt,\ncheck `isPendingRedirect()` before deciding whether to render FirebaseUI\nvia `start()`.\n\n```javascript\nif (ui.isPendingRedirect()) {\n  ui.start('#firebaseui-auth-container', uiConfig);\n}\n```\n\nHere is how you would track the Auth state across all your pages:\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"UTF-8\">\n    <title>Sample FirebaseUI App</title>\n    <script src=\"https://www.gstatic.com/firebasejs/9.13.0/firebase-app-compat.js\"></script>\n    <script src=\"https://www.gstatic.com/firebasejs/9.13.0/firebase-auth-compat.js\"></script>\n    <!-- *******************************************************************************************\n       * TODO(DEVELOPER): Paste the initialization snippet from:\n       * Firebase Console > Overview > Add Firebase to your web app. *\n       ***************************************************************************************** -->\n    <script type=\"text/javascript\">\n      initApp = function() {\n        firebase.auth().onAuthStateChanged(function(user) {\n          if (user) {\n            // User is signed in.\n            var displayName = user.displayName;\n            var email = user.email;\n            var emailVerified = user.emailVerified;\n            var photoURL = user.photoURL;\n            var uid = user.uid;\n            var phoneNumber = user.phoneNumber;\n            var providerData = user.providerData;\n            user.getIdToken().then(function(accessToken) {\n              document.getElementById('sign-in-status').textContent = 'Signed in';\n              document.getElementById('sign-in').textContent = 'Sign out';\n              document.getElementById('account-details').textContent = JSON.stringify({\n                displayName: displayName,\n                email: email,\n                emailVerified: emailVerified,\n                phoneNumber: phoneNumber,\n                photoURL: photoURL,\n                uid: uid,\n                accessToken: accessToken,\n                providerData: providerData\n              }, null, '  ');\n            });\n          } else {\n            // User is signed out.\n            document.getElementById('sign-in-status').textContent = 'Signed out';\n            document.getElementById('sign-in').textContent = 'Sign in';\n            document.getElementById('account-details').textContent = 'null';\n          }\n        }, function(error) {\n          console.log(error);\n        });\n      };\n\n      window.addEventListener('load', function() {\n        initApp()\n      });\n    </script>\n  </head>\n  <body>\n    <h1>Welcome to My Awesome App</h1>\n    <div id=\"sign-in-status\"></div>\n    <div id=\"sign-in\"></div>\n    <pre id=\"account-details\"></pre>\n  </body>\n</html>\n\n```\n\n## Configuration\n\nFirebaseUI supports the following configuration parameters.\n\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>autoUpgradeAnonymousUsers</td>\n<td>No</td>\n<td>\n  Whether to automatically upgrade existing anonymous users on sign-in/sign-up.\n  See <a href=\"#upgrading-anonymous-users\">Upgrading anonymous users</a>.\n  <br/>\n  <em>Default:</em>\n  <code>false</code>\n  When set to <code>true</code>, <code>signInFailure</code> callback is\n  required to be provided to handle merge conflicts.\n</td>\n</tr>\n<tr>\n<td>callbacks</td>\n<td>No</td>\n<td>\n  An object of developers <a href=\"#available-callbacks\">callbacks</a> after\n  specific events.\n  <br/>\n  <em>Default:</em> <code>{}</code>\n</td>\n</tr>\n<tr>\n<td>credentialHelper</td>\n<td>No</td>\n<td>\n  The Credential Helper to use.\n  See <a href=\"#credential-helper\">Credential Helper</a>.\n  <br/>\n  <em>Default:</em>\n  <code>firebaseui.auth.CredentialHelper.NONE</code>\n</td>\n</tr>\n<tr>\n<td>queryParameterForSignInSuccessUrl</td>\n<td>No</td>\n<td>\n  The redirect URL parameter name for the sign-in success URL. See\n  <a href=\"#overwriting-the-sign-in-success-url\">Overwriting the sign-in success URL</a>.\n  <br/>\n  <em>Default:</em> <code>\"signInSuccessUrl\"</code>\n</td>\n</tr>\n<tr>\n<td>queryParameterForWidgetMode</td>\n<td>No</td>\n<td>\n  The redirect URL parameter name for the “mode” of the Widget.\n  See <a href=\"#firebaseui-widget-modes\">FirebaseUI widget modes</a>.\n  <br/>\n  <em>Default:</em> <code>\"mode\"</code>\n</td>\n</tr>\n<tr>\n<td>signInFlow</td>\n<td>No</td>\n<td>\n  The sign-in flow to use for IDP providers: <code>redirect</code> or\n  <code>popup</code>.\n  <br/>\n  <em>Default:</em> <code>\"redirect\"</code>\n</td>\n</tr>\n<tr>\n<td>immediateFederatedRedirect</td>\n<td>No</td>\n<td>\n  A boolean which determines whether to immediately redirect to the provider's\n  site or instead show the default 'Sign in with Provider' button when there is\n  only a single federated provider in <code>signInOptions</code>. In order for\n  this option to take effect, the <code>signInOptions</code> must only hold a\n  single federated provider (like 'google.com') and signInFlow must be set to\n  'redirect'.\n</td>\n</tr>\n<tr>\n<td>signInOptions</td>\n<td>Yes</td>\n<td>\n  The list of <a href=\"#available-providers\">providers</a> enabled for signing\n  into your app. The order you specify them will be the order they are displayed\n  on the sign-in provider selection screen.\n</td>\n</tr>\n<tr>\n<td>signInSuccessUrl</td>\n<td>No</td>\n<td>\n  The URL where to redirect the user after a successful sign-in.\n  <strong>Required</strong> when the <code>signInSuccessWithAuthResult</code>\n  callback is not used or when it returns <code>true</code>.\n</td>\n</tr>\n<tr>\n<td>tosUrl</td>\n<td>Yes</td>\n<td>\n  The URL of the Terms of Service page or a callback function to be invoked\n  when Terms of Service link is clicked.\n</td>\n</tr>\n<tr>\n<td>privacyPolicyUrl</td>\n<td>Yes</td>\n<td>\n  The URL of the Privacy Policy page or a callback function to be invoked\n  when Privacy Policy link is clicked.\n</td>\n</tr>\n<tr>\n<td>adminRestrictedOperation</td>\n<td>No</td>\n<td>\n  This setting is only applicable to \"Google Cloud Identity Platform\" projects.\n  Learn more about [GCIP](https://cloud.google.com/identity-platform/).\n  The object for configuring `adminRestrictedOperation` options, contains 3\n  fields:\n  `status(boolean)`: This flag should mirror the project user actions\n  (\"Enable create\") settings. When sign-up is disabled in the project settings,\n  this should be set to `true`. Setting this to `true` without disabling sign-up\n  in the project settings will not have any effect. For GCIP projects, this is\n  done by going to the \"Settings\" page in the \"Identity Platform\" section in the\n  Cloud Console. Under the \"USERS\" tab, go to \"User actions\". Uncheck \"Enable\n  create (sign-up)\" and click \"SAVE\".\n  This does not enforce the policy but is rather useful for providing additional\n  instructions to the end user when a user tries to create a new user account\n  and the Auth server blocks the operation. This boolean works on all providers\n  (federated, email/password, email link and phone number).\n  `adminEmail(string|undefined)`: The optional site administrator email to\n  contact for access when sign up is disabled, for example: `admin@example.com`.\n  `helpLink(string|undefined)`: The optional help link to provide information\n  on how to get access to the site when sign up is disabled. For example:\n  `https://www.example.com/trouble_signing_in`.\n</td>\n</tr>\n</tbody>\n</table>\n\n### Credential Helper\n\nThe role of a credential helper is to help your users sign into your website.\nWhen one is enabled, your users will be prompted with email addresses and\nusernames they have saved from your app or other applications.\nFirebaseUI supports the one-tap sign-up credential helper. `accountchooser.com`\nis no longer supported.\n\n#### One-tap sign-up\n\n[One-tap sign-up](https://developers.google.com/identity/one-tap/web/)\nprovides seamless authentication flows to\nyour users with Google's one tap sign-up and automatic sign-in APIs.\nWith one tap sign-up, users are prompted to create an account with a dialog\nthat's inline with FirebaseUI NASCAR screen. With just one tap, they get a\nsecure, token-based, passwordless account with your service, protected by their\nGoogle Account. As the process is frictionless, users are much more likely to\nregister.\nReturning users are signed in automatically, even when they switch devices or\nplatforms, or after their session expires.\nOne-tap sign-up integrates with FirebaseUI and if you request Google OAuth\nscopes, you will still get back the expected Google OAuth access token even if\nthe user goes through the one-tap flow. However, in that case 'redirect' flow is\nalways used even when 'popup' is specified.\nIn addition, if you choose to force prompt for Google sign-in, one-tap auto\nsign-in will be automatically disabled.\nOne-tap is an additive feature and is only supported in the latest evergreen\nmodern browser environments.\nFor more information on how to configure one-tap sign-up, refer to the\n[one-tap get started guide](https://developers.google.com/identity/one-tap/web/guides/get-google-api-clientid).\n\nThe following example shows how to configure one-tap sign-up with FirebaseUI.\nAlong with the corresponding one-tap `credentialHelper`, the  Google OAuth\n`clientId` has to be provided with the Firebase Google provider:\n\n```javascript\nui.start('#firebaseui-auth-container', {\n  signInOptions: [\n    {\n      // Google provider must be enabled in Firebase Console to support one-tap\n      // sign-up.\n      provider: firebase.auth.GoogleAuthProvider.PROVIDER_ID,\n      // Required to enable ID token credentials for this provider.\n      // This can be obtained from the Credentials page of the Google APIs\n      // console. Use the same OAuth client ID used for the Google provider\n      // configured with GCIP or Firebase Auth.\n      clientId: 'xxxxxxxxxxxxxxxxx.apps.googleusercontent.com'\n    },\n    firebase.auth.FacebookAuthProvider.PROVIDER_ID,\n    firebase.auth.TwitterAuthProvider.PROVIDER_ID,\n    firebase.auth.GithubAuthProvider.PROVIDER_ID,\n    firebase.auth.EmailAuthProvider.PROVIDER_ID,\n  ],\n  // Required to enable one-tap sign-up credential helper.\n  credentialHelper: firebaseui.auth.CredentialHelper.GOOGLE_YOLO\n});\n// Auto sign-in for returning users is enabled by default except when prompt is\n// not 'none' in the Google provider custom parameters. To manually disable:\nui.disableAutoSignIn();\n```\n\nAuto sign-in for returning users can be disabled by calling\n`ui.disableAutoSignIn()`. This may be needed if the FirebaseUI sign-in page is\nbeing rendered after the user signs out.\n\nTo see FirebaseUI in action with one-tap sign-up, check out the FirebaseUI\n[demo app](https://fir-ui-demo-84a6c.firebaseapp.com/).\n\n|Credential Helper                 |Value                                                 |\n|----------------------------------|------------------------------------------------------|\n|One-tap sign-up                   |`firebaseui.auth.CredentialHelper.GOOGLE_YOLO`        |\n|None (disable)                    |`firebaseui.auth.CredentialHelper.NONE`               |\n\n### Available providers\n\n|Provider          |Value                                           |\n|------------------|------------------------------------------------|\n|Google            |`firebase.auth.GoogleAuthProvider.PROVIDER_ID`  |\n|Facebook          |`firebase.auth.FacebookAuthProvider.PROVIDER_ID`|\n|Twitter           |`firebase.auth.TwitterAuthProvider.PROVIDER_ID` |\n|Github            |`firebase.auth.GithubAuthProvider.PROVIDER_ID`  |\n|Email and password|`firebase.auth.EmailAuthProvider.PROVIDER_ID`   |\n|Phone number      |`firebase.auth.PhoneAuthProvider.PROVIDER_ID`   |\n|Anonymous         |`firebaseui.auth.AnonymousAuthProvider.PROVIDER_ID`|\n|Apple             |`apple.com`                                 |\n|Microsoft         |`microsoft.com`                                 |\n|Yahoo             |`yahoo.com`                                     |\n|SAML (GCIP only)  |`saml.*********`                               |\n|OIDC (GCIP only)  |`oidc.*********`                               |\n\n### Configure OAuth providers\n\nTo specify custom scopes, or custom OAuth parameters per provider, you can pass\nan object instead of just the provider value:\n\n```javascript\nui.start('#firebaseui-auth-container', {\n  signInOptions: [\n    {\n      provider: firebase.auth.GoogleAuthProvider.PROVIDER_ID,\n      scopes: [\n        'https://www.googleapis.com/auth/contacts.readonly'\n      ],\n      customParameters: {\n        // Forces account selection even when one account\n        // is available.\n        prompt: 'select_account'\n      }\n    },\n    {\n      provider: firebase.auth.FacebookAuthProvider.PROVIDER_ID,\n      scopes: [\n        'public_profile',\n        'email',\n        'user_likes',\n        'user_friends'\n      ],\n      customParameters: {\n        // Forces password re-entry.\n        auth_type: 'reauthenticate'\n      }\n    },\n    // Twitter does not support scopes.\n    firebase.auth.TwitterAuthProvider.PROVIDER_ID,\n    // Other providers don't need to be given as object.\n    firebase.auth.EmailAuthProvider.PROVIDER_ID\n  ]\n});\n```\n\n#### Generic OAuth provider\n\nYou can let your users authenticate with FirebaseUI using OAuth providers like\n[Apple](https://firebase.google.com/docs/auth/web/apple),\n[Microsoft Azure Active Directory](https://firebase.google.com/docs/auth/web/microsoft-oauth)\nand [Yahoo](https://firebase.google.com/docs/auth/web/yahoo-oauth)\nby integrating generic OAuth Login into your app.\n\nYou just need to pass the provider ID in `signInOptions`, FirebaseUI provides\nthe default configurations for the sign in button(button color, icon and display\nname):\n\n```javascript\nui.start('#firebaseui-auth-container', {\n  signInOptions: [\n    'apple.com',\n    'microsoft.com',\n    'yahoo.com',\n  ]\n});\n```\n\nYou can also override these default configurations with your own custom ones.\nGeneric OAuth providers' `signInOptions` support the following configuration\nparameters.\n\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>provider</td>\n<td>Yes</td>\n<td>The provider ID, eg. <code>microsoft.com</code>.</td>\n</tr>\n<tr>\n<td>providerName</td>\n<td>No</td>\n<td>\n  The provider name displayed to end users (sign in button/linking prompt),\n  eg. \"Microsoft\"\n  <em>Default:</em>\n  <code>provider ID</code>\n</td>\n</tr>\n<tr>\n<td>fullLabel</td>\n<td>No</td>\n<td>\n  The full label of the button. Instead of \"Sign in with $providerName\", this\n  button label will be used.\n  <em>Default:</em>\n  <code>Sign in with $providerName</code>\n</td>\n</tr>\n<tr>\n<td>buttonColor</td>\n<td>No</td>\n<td>\n  The color of sign in button. The css of the button can be overwritten with\n  the attribute/value in the HTML element:\n  <code>data-provider-id=\"providerId\"</code>\n</td>\n</tr>\n<tr>\n<td>iconUrl</td>\n<td>No</td>\n<td>\n  The URL of the Identity Provider's icon. This will be displayed on the\n  provider's sign-in button, etc.\n</td>\n</tr>\n<tr>\n<td>scopes</td>\n<td>No</td>\n<td>\n  The list of additional OAuth 2.0 scopes beyond basic profile that you want to\n  request from the authentication provider.\n</td>\n</tr>\n<tr>\n<td>customParameters</td>\n<td>No</td>\n<td>\n  The list of additional custom OAuth parameters that you want to send with the\n  OAuth request.\n</td>\n</tr>\n<tr>\n<td>loginHintKey</td>\n<td>No</td>\n<td>\n  The key of the custom parameter, with which the login hint can be passed to\n  the provider. This is useful in case a user previously signs up with an IdP\n  like Microsoft and then tries to sign in with email using the same Microsoft\n  email. FirebaseUI can then ask the user to sign in with that email to the\n  already registered account with Microsoft. For Microsoft and Yahoo,\n  this field is `login_hint`.\n</td>\n</tr>\n</tbody>\n</table>\n\n```javascript\nui.start('#firebaseui-auth-container', {\n  signInOptions: [\n    {\n      provider: 'microsoft.com',\n      providerName: 'Microsoft',\n      // To override the full label of the button.\n      // fullLabel: 'Login with Microsoft',\n      buttonColor: '#2F2F2F',\n      iconUrl: '<icon-url-of-sign-in-button>',\n      loginHintKey: 'login_hint',\n      scopes: [\n        'mail.read'\n      ],\n      customParameters: {\n        prompt: 'consent'\n      }\n    }\n  ]\n});\n```\n\n### OpenID Connect (OIDC) providers (GCIP only)\n\nFor [GCIP](https://cloud.google.com/identity-cp) customers, you can enable your\napp for\n[OpenID Connect (OIDC)](https://cloud.google.com/identity-cp/docs/how-to-enable-application-for-oidc)\nauthentication with FirebaseUI.\n\nOIDC providers' `signInOptions` support the following configuration parameters.\n\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>provider</td>\n<td>Yes</td>\n<td>The provider ID, eg. <code>oidc.myProvider</code>.</td>\n</tr>\n<tr>\n<td>providerName</td>\n<td>No</td>\n<td>\n  The provider name displayed to end users (sign in button/linking prompt).\n  <em>Default:</em>\n  <code>provider ID</code>\n</td>\n</tr>\n<tr>\n<td>fullLabel</td>\n<td>No</td>\n<td>\n  The full label of the button. Instead of \"Sign in with $providerName\", this\n  button label will be used.\n  <em>Default:</em>\n  <code>Sign in with $providerName</code>\n</td>\n</tr>\n<tr>\n<td>buttonColor</td>\n<td>Yes</td>\n<td>\n  The color of sign in button. The css of the button can be overwritten with\n  attribute/value in the HTML element:\n  <code>data-provider-id=\"providerId\"</code>\n</td>\n</tr>\n<tr>\n<td>iconUrl</td>\n<td>Yes</td>\n<td>\n  The URL of the Identity Provider's icon. This will be displayed on the\n  provider's sign-in button, etc.\n</td>\n</tr>\n<tr>\n<td>customParameters</td>\n<td>No</td>\n<td>\n  The list of additional custom parameters that the OIDC provider supports.\n</td>\n</tr>\n</tbody>\n</table>\n\n```javascript\nui.start('#firebaseui-auth-container', {\n  signInOptions: [\n    {\n      provider: 'oidc.myProvider',\n      providerName: 'MyOIDCProvider',\n      // To override the full label of the button.\n      // fullLabel: 'Employee Login',\n      buttonColor: '#2F2F2F',\n      iconUrl: '<icon-url-of-sign-in-button>',\n      customParameters: {\n        OIDCSupportedParameter: 'value'\n      }\n    }\n  ]\n});\n```\n\n### SAML providers (GCIP only)\n\nFor [GCIP](https://cloud.google.com/identity-cp) customers, you can enable your\napp for\n[SAML](https://cloud.google.com/identity-cp/docs/how-to-enable-application-for-saml)\nauthentication with FirebaseUI.\n\nSAML providers' `signInOptions` support the following configuration parameters.\n\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>provider</td>\n<td>Yes</td>\n<td>The provider ID, eg. <code>saml.myProvider</code>.</td>\n</tr>\n<tr>\n<td>providerName</td>\n<td>No</td>\n<td>\n  The provider name displayed to end users (sign in button/linking prompt).\n  <em>Default:</em>\n  <code>provider ID</code>\n</td>\n</tr>\n<tr>\n<td>fullLabel</td>\n<td>No</td>\n<td>\n  The full label of the button. Instead of \"Sign in with $providerName\", this\n  button label will be used.\n  <em>Default:</em>\n  <code>Sign in with $providerName</code>\n</td>\n</tr>\n<tr>\n<td>buttonColor</td>\n<td>Yes</td>\n<td>\n  The color of sign in button. The css of the button can be overwritten with\n  attribute/value in the HTML element:\n  <code>data-provider-id=\"providerId\"</code>\n</td>\n</tr>\n<tr>\n<td>iconUrl</td>\n<td>Yes</td>\n<td>\n  The URL of the Identity Provider's icon. This will be displayed on the\n  provider's sign-in button, etc.\n</td>\n</tr>\n</tbody>\n</table>\n\n```javascript\nui.start('#firebaseui-auth-container', {\n  signInOptions: [\n    {\n      provider: 'saml.myProvider',\n      providerName: 'MySAMLProvider',\n      // To override the full label of the button.\n      // fullLabel: 'Constractor Portal',\n      buttonColor: '#2F2F2F',\n      iconUrl: '<icon-url-of-sign-in-button>'\n    }\n  ]\n});\n```\n\n### Configure Email Provider\n\nYou can configure either email/password or email/link sign-in with FirebaseUI by\nproviding the relevant object in the configuration <code>signInOptions</code>\narray.\n\nYou can disable new user sign up with email providers by setting the flag\n`disableSignUp.status` to `true`. This will display an error message when new\nusers attempt to sign up.\n\nNote that this flag will only disable sign up from the UI and will not prevent\nsign up via REST API. It is highly recommended that Identity Platform projects\nenforce this policy via one of these 2 mechanisms:\n\n- Blocking functions: Set a `beforeCreate` trigger to disable sign up for email\n  providers.\n- In the Cloud Console / Settings / USERS tab, uncheck `Enable create (sign-up)`\n  checkbox. Though for this setting, sign up for all providers will be disabled.\n\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>provider</td>\n<td>string</td>\n<td>Yes</td>\n<td>\n  For email sign-in, this should be\n  <code>firebase.auth.EmailAuthProvider.PROVIDER_ID</code>.\n</td>\n</tr>\n<tr>\n<td>requireDisplayName</td>\n<td>boolean</td>\n<td>No</td>\n<td>\n  Defines whether to require the user to provide a display name during email\n  and password sign up.\n  <br/>\n  <em>Default:</em> <code>true</code>\n</td>\n</tr>\n<tr>\n<td>signInMethod</td>\n<td>string</td>\n<td>No</td>\n<td>\n  Defines whether to use email and password or email link authentication.\n  This should be\n  <code>firebase.auth.EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD</code>\n  for email and password sign-in,\n  <code>firebase.auth.EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD</code> for\n  email link authentication.\n  <br/>\n  <em>Default:</em>\n  <code>firebase.auth.EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD</code>\n</td>\n</tr>\n<tr>\n<td>forceSameDevice</td>\n<td>boolean</td>\n<td>No</td>\n<td>\n  Whether to force same device flow. If false, opening the link on a different\n  device will display a message instructing the user to open the link on the\n  same device or browser. This should be true when used with\n  anonymous user upgrade flows. This is only relevant to email link sign-in.\n  <em>Default:</em> <code>false</code>\n</td>\n</tr>\n<tr>\n<td>emailLinkSignIn</td>\n<td>function</td>\n<td>No</td>\n<td>\n  Defines the optional callback function to return\n  <code>firebase.auth.ActionCodeSettings</code> configuration to use when\n  sending the link. This provides the ability to specify how the link can be\n  handled, custom dynamic link, additional state in the deep link, etc.\n  When not provided, the current URL is used and a web only flow is triggered.\n  This is only relevant to email link sign-in.\n</td>\n</tr>\n<tr>\n<td>disableSignUp</td>\n<td><code>firebaseui.auth.DisableSignUpConfig</code></td>\n<td>No</td>\n<td>\n  The object for configuring `disableSignUp` options, contains 3 fields:\n  `status(boolean)`: Whether disable user from signing up with email providers\n  (email/password or email link).\n  `adminEmail(string|undefined)`: The optional site administrator email to\n  contact for access when sign up is disabled, for example: `admin@example.com`.\n  `helpLink(string|undefined)`: The optional help link to provide information\n  on how to get access to the site when sign up is disabled. For example:\n  `https://www.example.com/trouble_signing_in`.\n</td>\n</tr>\n</tbody>\n</table>\n\n#### Email and Password\n\nEmail and password authentication is the default sign-in method for Email\nproviders.\nThe `EmailAuthProvider` with email and password can be configured to require the\nuser to enter a display name (defaults to `true`).\n\n```javascript\nui.start('#firebaseui-auth-container', {\n  signInOptions: [\n    {\n      provider: firebase.auth.EmailAuthProvider.PROVIDER_ID,\n      requireDisplayName: false\n    }\n  ]\n});\n```\n\n#### Email Link Authentication\n\nFirebaseUI supports sign-in and sign-up with email links.\nUsing email link sign-in with FirebaseUI comes with the following benefits:\n\n- End to end support for email link sign-in with only a few configuration lines.\n- Enforces security and privacy best practices.\n- Ability to force same device flows or allow cross device flows where a user\n  can start the flow on one device and end it on another. This also covers\n  Android where email link sign-in is also supported with\n  [FirebaseUI-android](https://github.com/firebase/firebaseui-android/) and\n  [FirebaseUI-ios](https://github.com/firebase/firebaseui-ios/)\n  for iOS support.\n- Ability to switch to email link sign-in while continuing to sign-in existing\n  users with email and password.\n- Ability to support account linking, where an existing email link user signing\n  in with Facebook for the first time using the same email will have\n  both accounts merged so they can sign in with either (Facebook or email link)\n  going forward.\n- Ability to support anonymous user upgrade as long as the flow starts and ends\n  on the same device. Users opening the link on a different device will be\n  notified to open the link on the same device where the flow started.\n\n\nThe sample code below demonstrates how to configure email link sign-in with\nFirebaseUI. In this example, cross device flows are allowed and additional state\nis passed in the URL, as well as the ability to configure the link to open via\nmobile application too.\n\n```javascript\nui.start('#firebaseui-auth-container', {\n  signInOptions: [\n    {\n      provider: firebase.auth.EmailAuthProvider.PROVIDER_ID,\n      // Use email link authentication and do not require password.\n      // Note this setting affects new users only.\n      // For pre-existing users, they will still be prompted to provide their\n      // passwords on sign-in.\n      signInMethod: firebase.auth.EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD,\n      // Allow the user the ability to complete sign-in cross device, including\n      // the mobile apps specified in the ActionCodeSettings object below.\n      forceSameDevice: false,\n      // Used to define the optional firebase.auth.ActionCodeSettings if\n      // additional state needs to be passed along request and whether to open\n      // the link in a mobile app if it is installed.\n      emailLinkSignIn: function() {\n        return {\n          // Additional state showPromo=1234 can be retrieved from URL on\n          // sign-in completion in signInSuccess callback by checking\n          // window.location.href.\n          // If you are using a fragment in the URL, additional FirebaseUI\n          // parameters will be appended to the query string component instead\n          // of the fragment.\n          // So for a url: https://www.example.com/#/signin\n          // The completion URL will take the form:\n          // https://www.example.com/?uid_sid=xyz&ui_sd=0#/signin\n          // This should be taken into account when using frameworks with \"hash\n          // routing\".\n          url: 'https://www.example.com/completeSignIn?showPromo=1234',\n          // Custom FDL domain.\n          dynamicLinkDomain: 'example.page.link',\n          // Always true for email link sign-in.\n          handleCodeInApp: true,\n          // Whether to handle link in iOS app if installed.\n          iOS: {\n            bundleId: 'com.example.ios'\n          },\n          // Whether to handle link in Android app if opened in an Android\n          // device.\n          android: {\n            packageName: 'com.example.android',\n            installApp: true,\n            minimumVersion: '12'\n          }\n        };\n      }\n    }\n  ]\n});\n```\n\nWhen rendering the sign-in UI conditionally (relevant for single page apps),\nuse `ui.isPendingRedirect()` to detect if the URL corresponds to a sign-in with\nemail link and the UI needs to be rendered to complete sign-in.\nYou can also just use\n[firebase.auth().isSignInWithEmailLink(window.location.href)](https://firebase.google.com/docs/reference/js/firebase.auth.Auth#isSignInWithEmailLink).\n\n```javascript\n// Is there an email link sign-in?\nif (ui.isPendingRedirect()) {\n  ui.start('#firebaseui-auth-container', uiConfig);\n}\n// This can also be done via:\nif (firebase.auth().isSignInWithEmailLink(window.location.href)) {\n  ui.start('#firebaseui-auth-container', uiConfig);\n}\n```\n\nAdditional state passed in the <code>url</code> can be retrieved on sign-in\ncompletion via the signInSuccess callbacks.\n\nIf you are using a fragment in the URL, additional FirebaseUI parameters will be\nappended to the query string component instead of the fragment.\nSo for a url `https://www.example.com/#/signin`, the completion URL will take\nthe form `https://www.example.com/?uid_sid=xyz&ui_sd=0#/signin`.\nThis should be taken into account when using frameworks with \"hash routing\".\n\n```javascript\n// ...\nsignInSuccessWithAuthResult: function(authResult, redirectUrl) {\n  // If a user signed in with email link, ?showPromo=1234 can be obtained from\n  // window.location.href.\n  // ...\n  return false;\n}\n```\n\nFirebaseUI uses the\n[history API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) to\nclear the URL from query parameters related to email link sign-in after the\none-time code is processed. This prevents the user from re-triggering the\nsign-in completion flow again on page reload or if the user signs out and tries\nto sign in again in a single page application, etc.\n\nWhen same device flows are not enforced, a user going through account linking\nflow (eg. user signing in with Facebook with an email that belongs to an\nexisting email link user) opening the link on a different device would be given\nthe choice to continue sign-in with email link without merging the Facebook\ncredential or instructed to open the link on the same device where the flow was\ninitiated to successfully merge both accounts.\n\nYou cannot use email/password and email/link sign-in at the same time. Only one\nmode can be configured at a time. However, if you previously signed up users\nwith passwords. Switching to email/link will only apply to new users and\nexisting password users will continue to be prompted for password on sign-in.\n\n### Configure Phone Provider\n\nThe `PhoneAuthProvider` can be configured with custom reCAPTCHA parameters\nwhether reCAPTCHA is visible or invisible (defaults to `normal`). Refer to the\n[reCAPTCHA API docs](https://developers.google.com/recaptcha/docs/display) for\nmore details.\n\nThe default country to select in the phone number input can also be set.\n[List of supported country codes](javascript/data/README.md). If unspecified,\nthe phone number input will default to the United States (+1).\n\nThe countries to select can also be configured with `blacklistedCountries` or\n`whitelistedCountries`. It accepts either ISO (alpha-2) or E164\n(prefix with '+') formatted country code. Invalid country code will be ignored.\n`whitelistedCountries` and `blacklistedCountries` cannot be specified at the\nsame time.\n\nThe following options are currently supported. Any other\nparameters will be ignored.\n\n```javascript\nui.start('#firebaseui-auth-container', {\n  signInOptions: [\n    {\n      provider: firebase.auth.PhoneAuthProvider.PROVIDER_ID,\n      recaptchaParameters: {\n        type: 'image', // 'audio'\n        size: 'normal', // 'invisible' or 'compact'\n        badge: 'bottomleft' //' bottomright' or 'inline' applies to invisible.\n      },\n      defaultCountry: 'GB', // Set default country to the United Kingdom (+44).\n      // For prefilling the national number, set defaultNationNumber.\n      // This will only be observed if only phone Auth provider is used since\n      // for multiple providers, the NASCAR screen will always render first\n      // with a 'sign in with phone number' button.\n      defaultNationalNumber: '1234567890',\n      // You can also pass the full phone number string instead of the\n      // 'defaultCountry' and 'defaultNationalNumber'. However, in this case,\n      // the first country ID that matches the country code will be used to\n      // populate the country selector. So for countries that share the same\n      // country code, the selected country may not be the expected one.\n      // In that case, pass the 'defaultCountry' instead to ensure the exact\n      // country is selected. The 'defaultCountry' and 'defaultNationaNumber'\n      // will always have higher priority than 'loginHint' which will be ignored\n      // in their favor. In this case, the default country will be 'GB' even\n      // though 'loginHint' specified the country code as '+1'.\n      loginHint: '+11234567890',\n      // You can provide a 'whitelistedCountries' or 'blacklistedCountries' for\n      // countries to select. It takes an array of either ISO (alpha-2) or\n      // E164 (prefix with '+') formatted country codes. If 'defaultCountry' is\n      // not whitelisted or is blacklisted, the default country will be set to\n      // the first country available (alphabetical order). Notice that\n      // 'whitelistedCountries' and 'blacklistedCountries' cannot be specified\n      // at the same time.\n      whitelistedCountries: ['US', '+44']\n    }\n  ]\n});\n```\n\n### Configure Anonymous Provider\n\nThe `AnonymousAuthProvider` can be enabled to let users continue as a guest. If\na user is already signed in anonymously, clicking this sign-in option will keep\nthe same current anonymous user. In addition, when auto-upgrade for anonymous\nusers is enabled in addition to this option and a user is already signed in\nanonymously, clicking this sign-in option will also keep the same current\nanonymous user.\n\n```javascript\nui.start('#firebaseui-auth-container', {\n  signInOptions: [\n    {\n      provider: firebaseui.auth.AnonymousAuthProvider.PROVIDER_ID\n    }\n  ]\n});\n```\n\n### Sign In Flows\n\nTwo sign in flows are available:\n\n- `redirect`, the default, will perform a full page redirect to the sign-in page\n  of the provider (Google, Facebook...). This is recommended for mobile apps.\n- The `popup` flow will open a popup to the sign-in page of the provider. If the\n  popup is blocked by the browser, it will fall back to a full page redirect.\n\n### Available callbacks\n\n#### `signInSuccessWithAuthResult(authResult, redirectUrl)`\n\nThe `signInSuccessWithAuthResult` callback is invoked when user signs in\nsuccessfully.\nThe authResult provided here is a `firebaseui.auth.AuthResult` object, which\nincludes the current logged in user, the credential used to sign in the user,\nadditional user info indicating if the user is new or existing and operation\ntype like 'signIn' or 'link'. This callback will replace `signInSuccess` in\nfuture.\n\n**Parameters:**\n\n|Name         |Type                          | Optional|Description                                                                                                                                                              |\n|-------------|------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n|`authResult`|`firebaseui.auth.AuthResult`   |No       |The AuthResult of successful sign-in operation. The AuthResult object has same signature as `firebase.auth.UserCredential`.|\n|`redirectUrl`|`string`                      |Yes      |The URL where the user is redirected after the callback finishes. It will only be given if you [overwrite the sign-in success URL](#overwriting-the-sign-in-success-url).|\n\n**Should return: `boolean`**\n\nIf the callback returns `true`, then the page is automatically redirected\ndepending on the case:\n\n- If no `signInSuccessUrl` parameter was given in the URL (See:\n  [Overwriting the sign-in success URL](#overwriting-the-sign-in-success-url))\n  then the default `signInSuccessUrl` in config is used.\n- If the value is provided in the URL, that value will be used instead of the\n  static `signInSuccessUrl` in config.\n\nIf the callback returns `false` or nothing, the page is not automatically\nredirected.\n\n#### `signInSuccess(currentUser, credential, redirectUrl)`\n\nThis callback will be deprecated and will be replaced by\n`signInSuccessWithAuthResult` which takes `firebaseui.auth.AuthResult`.\n\n**Parameters:**\n\n|Name         |Type                          | Optional|Description                                                                                                                                                              |\n|-------------|------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n|`currentUser`|`firebase.User`               |No       |The logged in user.                                                                                                                                                      |\n|`credential` |`firebase.auth.AuthCredential`|Yes      |The credential used to sign in the user.                                                                                                                                  |\n|`redirectUrl`|`string`                      |Yes      |The URL where the user is redirected after the callback finishes. It will only be given if you [overwrite the sign-in success URL](#overwriting-the-sign-in-success-url).|\n\n**Should return: `boolean`**\n\nIf the callback returns `true`, then the page is automatically redirected\ndepending on the case:\n\n- If no `signInSuccessUrl` parameter was given in the URL (See:\n  [Overwriting the sign-in success URL](#overwriting-the-sign-in-success-url))\n  then the default `signInSuccessUrl` in config is used.\n- If the value is provided in the URL, that value will be used instead of the\n  static `signInSuccessUrl` in config.\n\nIf the callback returns `false` or nothing, the page is not automatically\nredirected.\n\n#### `signInFailure(error)`\n\nThe `signInFailure` callback is provided to handle any unrecoverable error\nencountered during the sign-in process.\nThe error provided here is a `firebaseui.auth.AuthUIError` error with the\nfollowing properties.\n\n**firebaseui.auth.AuthUIError properties:**\n\n|Name     |Type            |Optional |Description            |\n|---------|----------------|---------|-----------------------|\n|`code`   |`string`        |No       |The corresponding error code. Currently the only error code supported is `firebaseui/anonymous-upgrade-merge-conflict`   |\n|`credential` |`firebase.auth.AuthCredential`|Yes      |The existing non-anonymous user credential the user tried to sign in with.|\n\n**Should return: `Promise<void>|void`**\n\nFirebaseUI will wait for the returned promise to handle the reported error\nbefore clearing the UI. If no promise is returned, the UI will be cleared on\ncompletion. Even when this callback resolves, `signInSuccessWithAuthResult`\ncallback will not be triggered.\n\nThis callback is required when `autoUpgradeAnonymousUsers` is enabled.\n\n#### `uiShown()`\n\nThis callback is triggered the first time the widget UI is rendered. This is\nuseful for cases where the application should display a custom loader before\nFirebaseUI is displayed.\n\n### Example with all parameters used\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"UTF-8\">\n    <title>Sample FirebaseUI App</title>\n    <script src=\"https://www.gstatic.com/firebasejs/9.13.0/firebase-app-compat.js\"></script>\n    <script src=\"https://www.gstatic.com/firebasejs/9.13.0/firebase-auth-compat.js\"></script>\n    <!-- *******************************************************************************************\n       * TODO(DEVELOPER): Paste the initialization snippet from:\n       * Firebase Console > Overview > Add Firebase to your web app. *\n       ***************************************************************************************** -->\n    <script src=\"https://www.gstatic.com/firebasejs/ui/6.0.2/firebase-ui-auth.js\"></script>\n    <link type=\"text/css\" rel=\"stylesheet\" href=\"https://www.gstatic.com/firebasejs/ui/6.0.2/firebase-ui-auth.css\" />\n    <script type=\"text/javascript\">\n      // FirebaseUI config.\n      var uiConfig = {\n        callbacks: {\n          signInSuccessWithAuthResult: function(authResult, redirectUrl) {\n            var user = authResult.user;\n            var credential = authResult.credential;\n            var isNewUser = authResult.additionalUserInfo.isNewUser;\n            var providerId = authResult.additionalUserInfo.providerId;\n            var operationType = authResult.operationType;\n            // Do something with the returned AuthResult.\n            // Return type determines whether we continue the redirect\n            // automatically or whether we leave that to developer to handle.\n            return true;\n          },\n          signInFailure: function(error) {\n            // Some unrecoverable error occurred during sign-in.\n            // Return a promise when error handling is completed and FirebaseUI\n            // will reset, clearing any UI. This commonly occurs for error code\n            // 'firebaseui/anonymous-upgrade-merge-conflict' when merge conflict\n            // occurs. Check below for more details on this.\n            return handleUIError(error);\n          },\n          uiShown: function() {\n            // The widget is rendered.\n            // Hide the loader.\n            document.getElementById('loader').style.display = 'none';\n          }\n        },\n        credentialHelper: firebaseui.auth.CredentialHelper.NONE,\n        // Query parameter name for mode.\n        queryParameterForWidgetMode: 'mode',\n        // Query parameter name for sign in success url.\n        queryParameterForSignInSuccessUrl: 'signInSuccessUrl',\n        // Will use popup for IDP Providers sign-in flow instead of the default, redirect.\n        signInFlow: 'popup',\n        signInSuccessUrl: '<url-to-redirect-to-on-success>',\n        signInOptions: [\n          // Leave the lines as is for the providers you want to offer your users.\n          firebase.auth.GoogleAuthProvider.PROVIDER_ID,\n          firebase.auth.FacebookAuthProvider.PROVIDER_ID,\n          firebase.auth.TwitterAuthProvider.PROVIDER_ID,\n          {\n            provider: firebase.auth.EmailAuthProvider.PROVIDER_ID,\n            // Whether the display name should be displayed in the Sign Up page.\n            requireDisplayName: true\n          },\n          {\n            provider: firebase.auth.PhoneAuthProvider.PROVIDER_ID,\n            // Invisible reCAPTCHA with image challenge and bottom left badge.\n            recaptchaParameters: {\n              type: 'image',\n              size: 'invisible',\n              badge: 'bottomleft'\n            }\n          },\n          firebaseui.auth.AnonymousAuthProvider.PROVIDER_ID\n        ],\n        // Set to true if you only have a single federated provider like\n        // firebase.auth.GoogleAuthProvider.PROVIDER_ID and you would like to\n        // immediately redirect to the provider's site instead of showing a\n        // 'Sign in with Provider' button first. In order for this to take\n        // effect, the signInFlow option must also be set to 'redirect'.\n        immediateFederatedRedirect: false,\n        // tosUrl and privacyPolicyUrl accept either url string or a callback\n        // function.\n        // Terms of service url/callback.\n        tosUrl: '<your-tos-url>',\n        // Privacy policy url/callback.\n        privacyPolicyUrl: function() {\n          window.location.assign('<your-privacy-policy-url>');\n        }\n      };\n\n      var ui = new firebaseui.auth.AuthUI(firebase.auth());\n      // The start method will wait until the DOM is loaded.\n      ui.start('#firebaseui-auth-container', uiConfig);\n    </script>\n  </head>\n  <body>\n    <!-- The surrounding HTML is left untouched by FirebaseUI.\n         Your app may use that space for branding, controls and other customizations.-->\n    <h1>Welcome to My Awesome App</h1>\n    <div id=\"firebaseui-auth-container\"></div>\n    <div id=\"loader\">Loading...</div>\n  </body>\n</html>\n```\n\n### Upgrading anonymous users\n\n#### Enabling anonymous user upgrade\n\nWhen an anonymous user signs in or signs up with a permanent account, you want\nto be sure the user can continue with what they were doing before signing up.\nFor example, an anonymous user might have items in their shopping cart.\nAt check-out, you prompt the user to sign in or sign up. After the user is\nsigned in, the user's shopping cart should contain any items the user added\nwhile signed in anonymously.\n\nTo support this behavior, FirebaseUI makes it easy to \"upgrade\" an anonymous\naccount to a permanent account. To do so, simply set `autoUpgradeAnonymousUsers`\nto `true` when you configure the sign-in UI (this option is disabled by\ndefault).\n\nFirebaseUI links the new credential with the anonymous account using Firebase\nAuth's `linkWithCredential` method:\n```javascript\nanonymousUser.linkWithCredential(permanentCredential);\n```\nThe user will retain the same `uid` at the end of the flow and all data keyed\non that identifier would still be associated with that same user.\n\nAnonymous user upgrade is also supported by email link sign-in in FirebaseUI.\nAn anonymous user triggering the email link option will, on return from clicking\nthe link, upgrade to an email link user.\nHowever, `forceSameDevice` must be set to `true` in the email `signInOption`.\nThis is to ensure that when the user clicks the link, it is opened on the same\ndevice/browser where the initial anonymous user exists.\n\n#### Handling anonymous user upgrade merge conflicts\n\nThere are cases when a user, initially signed in anonymously, tries to\nupgrade to an existing Firebase user. For example, a user may have signed up\nwith a Google credential on another device. When trying to upgrade to the\nexisting Google user, an error `auth/credential-already-in-use` will be thrown\nby Firebase Auth as an existing user cannot be linked to another existing user.\nNo two users can share the same credential. In that case, both user data\nhave to be merged before one user is discarded (typically the anonymous user).\nIn the case above, the anonymous user shopping cart will be copied locally,\nthe anonymous user will be deleted and then the user is signed in with the\npermanent credential. The anonymous user data in temporary storage will be\ncopied back to the non-anonymous user.\n\nFirebaseUI will trigger the `signInFailure` callback with an error code\n`firebaseui/anonymous-upgrade-merge-conflict` when the above occurs. The error\nobject will also contain the permanent credential.\nSign-in with the permanent credential should be triggered in the callback to\ncomplete sign-in.\nBefore sign-in can be completed via\n`auth.signInWithCredential(error.credential)`, the data of the anonymous user\nmust be copied and the anonymous user deleted. After sign-in completion, the\ndata has to be copied back to the non-anonymous user. An example below\nillustrates how this flow would work if user data is persisted using Firebase\nRealtime Database.\n\n**Example:**\n\n```javascript\n// Temp variable to hold the anonymous user data if needed.\nvar data = null;\n// Hold a reference to the anonymous current user.\nvar anonymousUser = firebase.auth().currentUser;\nui.start('#firebaseui-auth-container', {\n  // Whether to upgrade anonymous users should be explicitly provided.\n  // The user must already be signed in anonymously before FirebaseUI is\n  // rendered.\n  autoUpgradeAnonymousUsers: true,\n  signInSuccessUrl: '<url-to-redirect-to-on-success>',\n  signInOptions: [\n    firebase.auth.GoogleAuthProvider.PROVIDER_ID,\n    firebase.auth.FacebookAuthProvider.PROVIDER_ID,\n    firebase.auth.EmailAuthProvider.PROVIDER_ID,\n    firebase.auth.PhoneAuthProvider.PROVIDER_ID\n  ],\n  callbacks: {\n    signInSuccessWithAuthResult: function(authResult, redirectUrl) {\n      // Process result. This will not trigger on merge conflicts.\n      // On success redirect to signInSuccessUrl.\n      return true;\n    },\n    // signInFailure callback must be provided to handle merge conflicts which\n    // occur when an existing credential is linked to an anonymous user.\n    signInFailure: function(error) {\n      // For merge conflicts, the error.code will be\n      // 'firebaseui/anonymous-upgrade-merge-conflict'.\n      if (error.code != 'firebaseui/anonymous-upgrade-merge-conflict') {\n        return Promise.resolve();\n      }\n      // The credential the user tried to sign in with.\n      var cred = error.credential;\n      // If using Firebase Realtime Database. The anonymous user data has to be\n      // copied to the non-anonymous user.\n      var app = firebase.app();\n      // Save anonymous user data first.\n      return app.database().ref('users/' + firebase.auth().currentUser.uid)\n          .once('value')\n          .then(function(snapshot) {\n            data = snapshot.val();\n            // This will trigger onAuthStateChanged listener which\n            // could trigger a redirect to another page.\n            // Ensure the upgrade flow is not interrupted by that callback\n            // and that this is given enough time to complete before\n            // redirection.\n            return firebase.auth().signInWithCredential(cred);\n          })\n          .then(function(user) {\n            // Original Anonymous Auth instance now has the new user.\n            return app.database().ref('users/' + user.uid).set(data);\n          })\n          .then(function() {\n            // Delete anonymnous user.\n            return anonymousUser.delete();\n          }).then(function() {\n            // Clear data in case a new user signs in, and the state change\n            // triggers.\n            data = null;\n            // FirebaseUI will reset and the UI cleared when this promise\n            // resolves.\n            // signInSuccessWithAuthResult will not run. Successful sign-in\n            // logic has to be run explicitly.\n            window.location.assign('<url-to-redirect-to-on-success>');\n          });\n\n    }\n  }\n});\n```\n\n### Multi-tenancy support\n\nFor [GCIP](https://cloud.google.com/identity-platform) customers, you can build\na tenant-specific sign-in page with FirebaseUI. Make sure you've enabled\nmulti-tenancy for your project and configured your tenants. See the\n[Multi-tenancy quickstart](https://cloud.google.com/identity-platform/docs/multi-tenancy-quickstart)\nto learn how.\n\nThis feature requires [firebase](https://www.npmjs.com/package/firebase)\nversion 6.6.0 or higher.\n\n\nTo use FirebaseUI with multi-tenancy, you need to set the tenant ID on the\nAuth instance being passed to FirebaseUI before calling `ui.start()`.\n\n```javascript\n// The Firebase Auth instance.\nvar auth = firebase.auth();\n// Initialize FirebaseUI.\nvar ui = new firebaseui.auth.AuthUI(auth);\n// Set the tenant ID on Auth instance.\nauth.tenantId = selectedTenantId;\n// Start the sign-in flow in selected tenant.\n// All sign-in attempts will now use this tenant ID.\nui.start('#firebaseui-auth-container', selectedTenantConfig);\n```\n\nFirebaseUI only handles the sign-in flows for you, you will still need to build\nyour own UI to let the end users select a tenant to sign in with.\nYou can refer to the example in this\n[guide](https://cloud.google.com/identity-platform/docs/multi-tenancy-ui).\n\nThere is also a\n[quickstart](https://cloud.google.com/identity-platform/docs/multi-tenancy-quickstart)\napp available to demonstrate how to build a single sign-in page with the\nFirebaseUI for two tenants which have different sets of identity providers\nenabled.\n\n\n## Customizing FirebaseUI for authentication\n\nCurrently, FirebaseUI does not offer customization out of the box. However, the\nHTML around the widget is not affected by it so you can display everything you\nwant around the widget container.\n\n## Advanced\n\n### FirebaseUI widget modes\n\nUpon initialization, FirebaseUI will look for the `mode` parameter in the URL.\nDepending on the value of this parameter, it will trigger a specific mode. When\nno `mode` parameter is found, it will default to the sign-in mode.\n\nYou can change the name of this parameter with the `queryParameterForWidgetMode`\nconfiguration parameter.\n\n|Query parameter value|Description |\n|---------------------|------------|\n|`?mode=select`       |Sign-in mode|\n\n**Example:**\n\n    https://<url-of-the-widget>?mode=select\n\n### Overwriting the sign-in success URL\n\nYou can pass a query parameter to the widget's URL that will overwrite the URL\nthe user is redirected to after a successful sign-in. If you do so, you must set\nthe configuration `signInSuccessUrl` value (even if it will be overwritten).\nWhen passing the redirect URL this way, the `signInSuccessWithAuthResult`\ncallback will receive the value as the `redirectUrl` argument.\n\nYou **must include the mode explicitly** in the URL when using the\n`signInSuccessUrl` parameter, otherwise FirebaseUI will directly redirect to the\nURL specified.\n\nYou can change the name of this parameter with the\n`queryParameterForSignInSuccessUrl` configuration parameter.\n\n**Example:**\n\n`https://<url-of-the-widget>?mode=select&signInSuccessUrl=signedIn.html` will\nredirect the user to `https://<url-of-the-widget>/signedIn.html` after a\nsuccessful sign-in flow.\n\n## Developer Setup\n\n### Dependencies\n\nTo set up a development environment to build FirebaseUI from source, you must\nhave the following installed:\n- Node.js (>= 6.0.0)\n- npm (should be included with Node.js)\n- Java SE Runtime Environment 8\n\nIn order to run the demo and tests, you must also have:\n- Python (2.7)\n\nDownload the FirebaseUI source and its dependencies with:\n\n```bash\ngit clone https://github.com/firebase/firebaseui-web.git\ncd firebaseui-web\nnpm install\n```\n\n### Building FirebaseUI\n\nTo build the library, run:\n```bash\nnpm run build\n```\n\nThis will create output files in the `dist/` folder.\n\nTo build a localized JavaScript binary, run:\n```bash\nnpm run build build-js-{LANGUAGE_CODE}\n```\nwhere `{LANGUAGE_CODE}` is replaced by the\n[code of the language you want](LANGUAGES.md). For example, the French binary\ncan be built with `npm run build build-js-fr`. This will create a binary\n`firebaseui__fr.js` in the `dist/` folder.\n\nBuild names for language codes with underscores, eg. `zh_tw`, `zh_cn`, `pt_pt`\nwill be mapped to `zh-TW`, `xh-CN`, `pt-PT`. The underscore will be replaced by\na hyphen symbol and the subsequent characters will be capitalized.\n\n```bash\nnpm run build build-js-zh-TW\n```\n\nThis will create a binary `firebaseui__zh_tw.js` in the `dist/` folder.\n\nTo build a localized npm FirebaseUI module, run:\n\n```bash\nnpm run build build-npm-{LANGUAGE_CODE}\n```\n\nMake sure all underscore symbols in the `LANGUAGE_CODE` are replaced with\ndashes.\nThis will generate `dist/npm__{LANGUAGE_CODE}.js`.\nYou can then import/require it:\n```javascript\nimport firebaseui from './npm__{LANGUAGE_CODE}';\n```\n\nBuild names for language codes with underscores, eg. `zh_tw`, `zh_cn`, `pt_pt`\nwill be mapped to `zh-TW`, `xh-CN`, `pt-PT`. The underscore will be replaced by\na hyphen symbol and the subsequent characters will be capitalized.\n\n```bash\nnpm run build build-npm-zh-TW\n```\n\nThis will create a binary `npm__zh_tw.js` in the `dist/` folder.\n\nTo build a localized ES module of FirebaseUI, run:\n\n```bash\nnpm run build build-esm-{LANGUAGE_CODE}\n```\n\nMake sure all underscore symbols in the `LANGUAGE_CODE` are replaced with\ndashes.\nThis will generate `dist/esm__{LANGUAGE_CODE}.js`.\nYou can then import/require it:\n`","readmeFilename":"README.md"}