Skip to content

Commit

Permalink
Send login_hint when detecting previous session #729
Browse files Browse the repository at this point in the history
  • Loading branch information
glena committed Dec 19, 2016
1 parent 9592479 commit 67181d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/quick-auth/actions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { skipQuickAuth as skip } from '../quick_auth';
import { getEntity, read, swap, updateEntity } from '../store/index';
import { logIn as coreLogIn } from '../core/actions';
import { lastUsedConnection, lastUsedUsername } from '../core/sso/index';
import * as l from '../core/index';

export function skipQuickAuth(id) {
Expand All @@ -12,10 +13,11 @@ export function logIn(id, connection, loginHint) {
const connectionScopes = l.auth.connectionScopes(m);
const scopes = connectionScopes.get(connection.get("name"));
const params = {
connection: connection.get("name"),
connection_scope: scopes ? scopes.toJS() : []
connection: connection.get("name"),
connection_scope: scopes ? scopes.toJS() : [],
login_hint: lastUsedUsername(m)
};

if (!l.auth.redirect(m) && connection.get("strategy") === "facebook") {
params.display = "popup";
}
Expand Down

0 comments on commit 67181d2

Please sign in to comment.