flutter - change password with api by typing old and new password + submit button is active when both textfields are filled - flutter

I want to change the password in the API with flutter by typing old and new password in the textfield with print success or failed. If you want to help me I would be
very grateful :)

Related

Terminal showing ReSubScription:{} when using LiveQuery in parse_server_sdk_flutter

I followed all steps in documentation, but this function never gets called:
subscription.on(LiveQueryEvent.create,
(value) {});
All I receive in terminal is this: "ReSubScription:{}".
I am trying to capture the event when one of my classes in the database gets a new record/entry.
If requested, I can arrange a demo codebase, but please help me get through this.
PS: I am calling this subscription.on() method in initState() method of a stateful widget, not in main().
UPDATE
I am sharing link of git repo of a minimal app to demonstrate what I did. Here is the link
Please see what have I done incorrect with livequery. Would be grateful for any pointers/guidance.
UPDATE 2nd
Please note, I've hardcoded adminId (objectId of admin logged in). Check TODO plz.
My Testing procedure:
Create a user from backend database manually using Parse Dashboard. Plz Keep username = email.
Open app. Click admin button. Go to AdminLogin page and enter your email and password.
If you are successful, app will navigate to next white screen. This confirms that auth was done successfully.
Open the app again. Click user button. Go to UserForm.
Enter name and hit subscriber button. This will create a new class in Database by the name "Subscribers" and add columns "adminId" and "name"
(plz hardcode the adminId in code bcoz you already know it)
Now open the app again and go to admin and login again to move to control panel (white screen).
Wait for the back4app to send trigger/callback. (which shows ReSubScription:{}).
The problem is related to the code below:
final ParseObject object = ParseObject('Subscribers');
final response = await object.create();
if (response.success && response.count > 0) {
final ParseObject record = response.results[0];
record.set('name', name);
record.set('adminId', adminId);
await record.save();
}
Note that first you create the object with no adminId and that's why your event is not triggered. You then set the adminId and update the object. In that moment, your enter event should be triggered. Please listen to all different events (create, enter, update, leave, delete) and you will see it happening.

Reset password inside the app using flutter

The question is about Firebase authentication :
Do you know how to reset password "inside" the app ? I know how to reset it through a link using this function :
firebaseAuth.sendPasswordResetEmail(email: email)
But I do not find a way to do it inside the app with flutter.
Thanks
Here is a snipped for updating user password.
user.updatePassword(newPassword).then(function() {
// Update successful.
}).catch(function(error) {
// An error happened.
});
for more info, read https://firebase.google.com/docs/auth/web/manage-users

How can I change the user that I am using for smartface

When I started the smartface ide first time I entered my email and password, Now I want to use another user, How can I do that?
There is 'Welcome ... logout' on right bottom corner.You can log out pressing 'logout' in here and log in with another user.

how to reset password in fresh installed laravel 5?

i have just installed laravel5 and migrate the users table and inserted the users in table.
now i want to change the password using password reset in laravel5.
when is use the email to reset the password the bootbox alert is seen saying We have e-mailed your password reset link!. but, actually email is not being sent.
i have used the mandrill for email purpose in that project, i want to reset password.anyone here who knows how to reset password sending password in laravel 5?
Run this in your controller function,
$password = "123456";
$new_password = Hash::make($password);
return $new_password;
This will return the hashed new password. replace the new password with password field of users table.
You can use php artisan tinker to write some php code directly from the command line and change your password, e.g.:
$user = User::find(1);
$user->password = \Hash::make($password);
$user->save();

Can't login via Facebook iOS SDK 3 with a test user

Have a code that is working with ordinary FB user (login and post). Just created test user but unable to login. Getting message "we didn't recognize your email address or phone number". After calling https://graph.facebook.com/362652477144946/accounts/test-users?... I got:
{
"id": "100004233554579",
"access_token": "...",
"login_url": "https://www.facebook.com/platform/test_account_login.php?user_id=100004233554579&n=Ffaa4FVusNloYGS",
"email": "iosproject_gaxfjez_iosproject\u0040tfbnw.net",
"password": "..."
}
Tried entering "100004233554579", "Ffaa4FVusNloYGS" and "iosproject_gaxfjez_iosproject\u0040tfbnw.net" at username but nothing works. Any ideas?
UPDATE1 Noticed "\u0040" in email, so changed that to "#". But then getting "We didn't recognize your email" :)
UPDATE2 Noticed there's another email "100004233554579#facebook.com" when logged to Facebook login_url but it doesn't work too.
I faced the same problem with test facebook user login from mobile device - "we didn't recognize your email address or phone number".
What I did:
Went to dev console and created new test user
Clicked edit and changed password in console - than was a mistake
After you change password via dev console - facebook also changes test email. And you are able to login only at facebook.com website (not android, iOs or m.facebook.com) - because you get a security warning that email was changed. Also you can't use simple emails like qwerty.
What you need to do to get it work:
Create new test user in console (do not change anything)
Go to Graph API, generate application token, get test users via {app_id}/accounts/test-users (details)
POST new password (only password) to the test user /{user_id} (details)
Now you shall be able to login using m.facebook.com, Android or iOS apps
A little bit wierd
From your response, it seems like the email required for login should be
iosproject_gaxfjez_iosproject#tfbnw.net.
That should work for you with the password generated.
You can read more about creating test users here.
If it still doesn't solve your issue, please create a bug report at
http://developers.facebook.com/bugs and we'll be more than happy to look into it.