Skip to content

Trying to use PasswordlessEmail flow doesn't work #12

@gabrielvillage

Description

@gabrielvillage

Hello! I'm trying to implement Auth0 on my Unity project and when calling the StartPasswordlessEmailFlowAsync I get the following error:
Error Unity Auth0.Core.Exceptions.ApiError : {"error":"bad.connection","error_description":"Missing required property: connection"}
I don't know how to fix it as the PasswordlessEmailRequest doesn't have a Connection parameter and digging into the StartPasswordlessEmailFlowAsync method it shows it sets the connection type to "email".

Here's the code I'm using:

        var request = new PasswordlessEmailRequest()
        {
            ClientId = clientId,
            ClientSecret = authManager.Settings.ClientSecret,
            Email = emailField.text,
            Type = PasswordlessEmailRequestType.Link,
        };

        PasswordlessEmailResponse response = null;
        ErrorApiException apiError = null;

        try
        {

            response = await authManager.Auth0.StartPasswordlessEmailFlowAsync(request);
        }
        catch (ErrorApiException ex)
        {
            apiError = ex;
        }

        if (apiError != null)
        {
            Debug.LogError(apiError.ApiError + " : " + apiError.Message);
            return;
        }
        Debug.Log($"{response.Email} : {response.EmailVerified} : {response.Id}");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions