I am using Firebase with a Google authentication provider.
When using Google OAuth in other applications, I can configure authentication for specific domains.
The Google OpenID Connect documentation has the "hd" parameter used for this feature. https://developers.google.com/identity/protocols/OpenIDConnect#hd-param
How can this be configured for Firebase?
With the new setCustomParameters function you can add hd parameter
hd
var provider = new firebase.auth.GoogleAuthProvider(); provider.addScope('email'); provider.setCustomParameters({ 'hd': 'uw.edu' }); firebase.auth().signInWithRedirect(provider);
Here is the API documentation https://firebase.google.com/docs/reference/js/firebase.auth.GoogleAuthProvider#setCustomParameters
At least Firebase version 3.5.0 is required - October 14, 2016 https://firebase.google.com/support/release-notes/js
Source: https://habr.com/ru/post/1240217/More articles:Get the latest updated file in HDFS - unixReact-native@0.26.3 requires peer-to-peer interaction @ 15.0.2, but not one of them was installed - node.jsCan I use multiple template engines in Sails.js? - expresscalculate the direction of gravity between the planets - cReact - npmonchange display a GridView record if it exists from the database using javascript - javascriptPython3: print (somestring, end = '\ r', flush = True) shows nothing - pythonUnable to customize Google login area on Android - androidSQL query that Typos can find in Arabic - performanceSQL: 4 conditions combined with OR - sqlAll Articles