Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
feat(authService): support empty login request
Browse files Browse the repository at this point in the history
  • Loading branch information
a-jackson committed Mar 17, 2017
1 parent 06084c1 commit 0d8f258
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/authService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0d8f258

Please sign in to comment.