bugthesystem / FireSharp

An asynchronous cross-platform .Net library for Firebase
The Unlicense
697 stars 147 forks source link

CreateUser #85

Closed malohr closed 7 years ago

malohr commented 7 years ago

Hi,

I tried to create a user via email and pw, but unfortunately it doesn't work. Here is my method

public partial class SignUp : ContentPage {

    private const string BasePath = "my url to the database";
    private const string FirebaseSecret = "API key is here";
    private static FirebaseClient _client;
    private String email;
    private String password;

    public SignUp()
    {
        InitializeComponent();

        IFirebaseConfig config = new FirebaseConfig
        {
            AuthSecret = FirebaseSecret,
            BasePath = BasePath
        };

        _client = new FirebaseClient(config);
    }

    public async void Submit(object sender, EventArgs e)
    {
        email = UsernameEntry.Text;
        password = PasswordEntry.Text;
        _client.CreateUser(email, password);

    }
EdersF commented 7 years ago

I have the same problem :/

arcosmin commented 7 years ago

Have you enabled the email/password authentication?

image

Also, I assume you are using the correct secret. FireSharp uses a deprecated method, you can find this secret under Cog (top left) -> Project Settings -> Service Accounts -> Database Secrets.

If these don't fix it, can you post the response you are getting back?

arcosmin commented 7 years ago

No reply assumed resolved