mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Add the option to use a hosted domain with google's oauth
The hd option is used to restrict which email domain that are allowed to log in to your app. Starting from this commit you can pass `hostedDomain: 'example.com'` to only allow emails from the domain `example.com`.
This commit is contained in:
committed by
Slava Kim
parent
04e34670bf
commit
115164e4af
@@ -44,6 +44,10 @@ Google.requestCredential = function (options, credentialRequestCompleteCallback)
|
||||
'&access_type=' + accessType +
|
||||
'&approval_prompt=' + approvalPrompt;
|
||||
|
||||
if (options.hostedDomain) {
|
||||
loginUrl += '&hd=' + encodeURIComponent(options.hostedDomain);
|
||||
}
|
||||
|
||||
Oauth.initiateLogin(credentialToken,
|
||||
loginUrl,
|
||||
credentialRequestCompleteCallback,
|
||||
|
||||
Reference in New Issue
Block a user