Hi, i was trying to integrate signup and signin th...
# ask-a-descoper
a
Hi, i was trying to integrate signup and signin through flow created using signup or sign in flow but while integrating it on angular it is showing both interation id same and now signup is integrated perfectly but while trying to setup sign in component it is showing error sign in code
Copy code
const data = {
      email: this.loginId,
      password: this.password
    };

    console.log('Submitting login via Interaction ID...');
    
    const result: any = await this.nextFn('AMeyg_7npF', data);
getting error as
Copy code
index.js:2 [Descope] [E062107]: User already exists Failed to sign up, login ID already exists -  Error
    at Object.error (index.js:2:58098)
    at Es.<anonymous> (index.js:2:72540)
    at Es.<anonymous> (index.js:2:88057)
    at Generator.next (<anonymous>)
    at s (index.js:1:653)
and also
Copy code
Step "Create account" is waiting  
{
    "screen": {
        "id": "byos-flow-copy/SC397AbsF1WwGA1Sx8B63mPQ8sbzi",
        "state": {
            "componentsConfig": {
                "newPassword": {
                    "active-policies": "minlength,uppercase,lowercase,number,nonalphanumeric",
                    "available-policies": "[{\"compare\":\"\",\"data\":\"\",\"id\":\"minlength\",\"message\":\"At least {{value}} characters\",\"pattern\":\"^.{{{value}},}$\"},{\"compare\":\"\",\"data\":\"\",\"id\":\"uppercase\",\"message\":\"1 uppercase letter\",\"pattern\":\"[A-Z]\"},{\"compare\":\"\",\"data\":\"\",\"id\":\"lowercase\",\"message\":\"1 lowercase letter\",\"pattern\":\"[a-z]\"},{\"compare\":\"\",\"data\":\"\",\"id\":\"number\",\"message\":\"1 number\",\"pattern\":\"\\\\d\"},{\"compare\":\"\",\"data\":\"\",\"id\":\"nonalphanumeric\",\"message\":\"1 symbol\",\"pattern\":\"[^a-zA-Z0-9]\"}]",
                    "data-password-policy-value-minlength": "8"
                },
                "samlGroupMappings": {},
                "ssoApplications": {},
                "thirdPartyAppApproveScopes": {},
                "userRoles": {},
                "userSelectedTenant": {}
            },
            "errorText": "Failed to sign up, login ID already exists",
            "errorType": "PasswordSignUpFailed",
            "form": {
                "email": "<mailto:aksha+36@signitysolutions.com|aksha+36@signitysolutions.com>",
                "spAcsUrl": "",
                "spEntityId": "",
                "spMetadataUrl": ""
            },
            "inputs": {
                "email": "<mailto:aksha+36@signitysolutions.com|aksha+36@signitysolutions.com>",
                "spAcsUrl": "",
                "spEntityId": "",
                "spMetadataUrl": ""
            },
            "project": {
                "name": "POC"
            },
            "pswdPolicy": null
        }
    },
    "status": "waiting",
    "stepId": "6",
    "stepName": "Create account",
    "action": "",
    "error": {
        "code": "E062107",
        "description": "User already exists",
        "message": ""
    }
}
can you please help fix this issue
a
Hi Aksha, Thanks for sharing the screenshots — this helped identify the issue. Right now both your Sign-up and Sign-in steps are using the same interaction ID (
AMeyg_7npF
). This interaction ID corresponds to the Create Account step, so even when you try to log in with an existing user, the flow is still attempting to create a new account, which results in:
User already exists (E062107)
In Descope flows, each step (Sign-up vs Sign-in) must have its own unique interaction ID.
Instead of calling interaction IDs manually, you can simply start the flow:
Copy code
descope.startFlow('sign-up-or-in')
and use the returned
interactionId
dynamically. The flow will automatically route users to sign-up or sign-in based on whether the user already exists.
Please let me know if this helps
a
thanks for quick reply let me check
a
Sure!