Skip to content
This repository was archived by the owner on Feb 19, 2022. It is now read-only.

login_hint functionality added #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/factories/GAuth.factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
var DOMAIN = undefined;
var SCOPE = 'https://www.googleapis.com/auth/userinfo.email';
var RESPONSE_TYPE = 'token id_token';
var LOGIN_HINT = undefined;

function load(){
var deferred = $q.defer();
Expand All @@ -31,6 +32,7 @@
if(mode) {
config.user_id = GData.getUserId();
config.immediate = true;
config.login_hint = LOGIN_HINT;
}
if(DOMAIN != undefined)
config.hd = DOMAIN;
Expand Down Expand Up @@ -107,6 +109,10 @@
SCOPE = scope;
},

setLoginHint: function (login_hint) {
LOGIN_HINT = login_hint
},

checkAuth: function(){
var deferred = $q.defer();
signin(true, function() {
Expand Down