Permalink
Browse files

feat(authService): support empty login request

  • Loading branch information...
a-jackson committed Mar 17, 2017
1 parent 06084c1 commit 0d8f25812808bf8107f972a725827eb6ae41c05e
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/authService.js
@@ -437,14 +437,14 @@ export class AuthService {
*
* @return {Promise<Object>|Promise<Error>} Server response as Object
*/
login(emailOrCredentials: string|{}, passwordOrOptions?: string|{}, optionsOrRedirectUri?: {}, redirectUri?: string): Promise<any> {
login(emailOrCredentials?: string|{}, passwordOrOptions?: string|{}, optionsOrRedirectUri?: {}, redirectUri?: string): Promise<any> {
let normalized = {};
if (typeof emailOrCredentials === 'object') {
normalized.credentials = emailOrCredentials;
normalized.options = passwordOrOptions;
normalized.redirectUri = optionsOrRedirectUri;
} else {
} else if (typeof emailOrCredentials === 'string') {
normalized.credentials = {
'email' : emailOrCredentials,
'password': passwordOrOptions

0 comments on commit 0d8f258

Please sign in to comment.