Skip to content

Sign up with email and password #14

Open
@rymkapro

Description

Bug report

Describe the bug

Calling function sign_up_with_email_and_password always returns an error

sign_up_with_email_and_password(&data.email.to_lowercase(), &data.password, None)
        .await
        .map_err(|e| {
            tracing::error!("Error details: {:?}", e);
            match e {
                supabase_auth::error::Error::AuthError { status, message } => {
                    if status == 200 {
                        tracing::debug!("Signup message: {:?}", message);
                    }
                    APIError::new(status, "Create user")
                        .data(serde_json::from_str(&message).unwrap())
                }
                _ => {
                    tracing::error!("[CreateUser]: supabase create user ({})", e);
                    APIError::internal_server_error(&APIErrorCode::HandlerSinginWithEmail)
                }
            }
        })?;

tracing::error!("Error details: {:?}", e) will show something like that
Error details: AuthError { status: 200, message: "{\"id\":\"ebae4bf5-e...\",\"aud\":\"authenticated\",\"role\":\"authenticated\",\"...}" }

But the user is created successfuly in supabase and receives a confirmation email

It also seems that this function returns not a Session

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions