Constructors

Methods

  • To do guest login after activating the feature from admin ui, call actionGuestLogin() Please refer to https://docs.cidaas.com/docs/cidaas-iam/95fd8492a64fe-guest-login for more details

    Parameters

    • requestId: string

    Returns void

    cidaasLoginService.actionGuestLogin('your request id');
    
  • To continue after Consent acceptance, call consentContinue().

    Parameters

    Returns void

    cidaasLoginService.consentContinue({
    track_id: 'your track id'
    });
  • To automatically do user login after successful registration, call loginAfterRegister(). Make sure to turn on "auto login after register" switch on the admin ui to activate loginAfterRegister flow. Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/qwwamc2f378wi-auto-login-after-register for more details.

    Parameters

    Returns void

    cidaasLoginService.loginAfterRegister({
    device_id: 'your device id',
    dc: 'device capacity'
    rememberMe: false,
    trackId: 'your track id',
    device_fp: 'device fingerprint'
    });
  • To continue after MFA completion, call mfaContinue().

    Parameters

    Returns void

    cidaasLoginService.mfaContinue({
    track_id: 'your track id'
    });
  • For progressive registration, call progressiveRegistration(). While logging in If the API returns 417 with the error message MissingRequiredFields, call the getMissingFields to get the list of missing fileds and proceed with progressive registration. In the sample request only the required fields are added, however you must provide the missing fields along with the required fields. Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/l7sknp2pytryr-progressive-registration for more details.

    Parameters

    Returns Promise<any>

    const options = {
    sub: 'your sub',
    }
    const headers = {
    trackId: 'the track id received while logging in',
    requestId: 'request id of the session',
    acceptlanguage: 'your locale/browser locale (OPTIONAL)',
    }
    cidaasLoginService.progressiveRegistration(options, headers)
    .then(function(response) {
    // type your code here
    })
    .catch(function (ex) {
    // your failure code here
    });
  • To register with social providers, call registerWithSocial(). This will redirect you to the facebook login page.

    Parameters

    Returns void

    Note: giving the queryParams is not required.

    queryParams = {
    dc: 'dc',
    device_fp: 'device_fp'
    }
    cidaasLoginService.registerWithSocial({
    provider: 'facebook',
    requestId: 'your requestId',
    }, queryParams);