Firebase sendPasswordResetEmail never completes - flutter

I'm trying to send a password reset email with firebase but it doesn't work. It doesn't throw any exceptions either. It just never completes, and I see no errors in the console. I tried debugging it and I saw that the parameter action code is null, is it supposed to be? All guides covering this don't add any action codesettings. I've tried signing out the user first but that doesn't seem to work. What to do?
This await firebaseAuth.sendPasswordResetEmail(email: currentEmail); is nested in a try-catch block that's all.
Console output:
W/System ( 757): Ignoring header X-Firebase-Locale because its value was null.
I/System.out( 757): isEmailSend:POST
I/System.out( 757): port:443
D/GraphicBuffer( 757): register, handle(0x8240d540) (w:720 h:1504 s:720 f:0x1 u:f02)
I/System.out( 757): Check isMmsSendPdu
I/System.out( 757): [OkHttp] sendRequest<<
This is all I see. The future just never completes.

Firstly i was stuck too in this while doing my first attempt.I realized i didn't activated resetpassword method on firebase console authetication.
After this i got same result because while trying with email doesn't exist on firebase console user panel that mail adress.
My suggestion check turn on password reset method on console and try it with exist email user. and be sure you don't try with null in email
all of that if doesn't work maybe it can be about the port settings.
And one more try change this
firebaseAuth.sendPasswordResetEmail(email: currentEmail)
to
firebaseAuth.sendPasswordResetEmail(currentEmail)

Please check if your emulator is connected to the internet. Sometimes the wifi is on but does not connected to the internet.
and also make sure you email/password sign-in method on firebase is enabled
and if that doesn't work then add this line: android:usesCleartextTraffic="true" to your android > app > src > main > AndroidMaifest.xml

Related

Firebase something went wrong flutter

I'm new to coding and I'm trying to create a login page with Firebase but the problem is that when I put my email + my password I have this message that appears:
W/System (30113): Ignoring header X-Firebase-Locale because its value was null.
D/FirebaseAuth(30113): Notifying id token listeners about user ( gZ4NEwxh0qRRl32ypTGvqgX6kJx2 ).
I connected Firebase to my application and I put the authentication by mail, I added the sha1 and the sha-256.
I see nothing wrong with that. Most importantly, you can log into your account.
If you think Ignoring header X-Firebase-Locale because its value was null. should be removed, I suggest you take a look at this answer:
PREPARATION
Check if your emulator has the permission to access internet and also is connected to.
Email/Password Sign-in method in your firebase console is enabled to gain access.
STEP 1: Create sha1 key + debug key information + Adding firebase. You probably have your sha1 key only with the normal
information from the release key, I guess?
STEP 2: Activate Android Device Verification from console.cloud.google.com and insert your sha keys that are
automatically generated by firebase + their matching preferences
(like package name...)
CONCLUSION
Your code looks good to me! Everything is set up right. I think you
forgot some trivial settings or the right sha key.

Authentication context not auditing success event

I use keycloak to reset a user's password through a custom flow.
The flow works for resetting the password and logging/auditing error events.
But the context.success() doesn't log events in EVENT_ENTITY. I tried changing the event type to try and find the root cause using
context.getEvent().event(EventType.SEND_RESET_PASSWORD_ERROR); // for eg. context.success();
I am not sure what the problem is, or fail to understand what is different from setting a success and error.
I found the issue and it was me missing a call to send the event on success.
on error on context.getEvent().error(..) which call EventBuilder.send() internally. I had to use context.getEvent().sucess() to save the event on success.

.HttpContext.User is null after successful login from SAML Identity Provider?

Trying to retrofit an old webforms application.
Got my configuration working so that it's prompting for login and successfully redirecting back to the application. The folks that manage the IP can see the response is generated.
However in the callback to my application the User is null. I'm told if it's configured correctly it should be populated.
We have a custom IHttpModule and that is where I can see getting hit with the call to /Saml2/Acs with the User not populated. I think this may be expected as the handler for that is supposed to populate the User, I think? However the following call (the returnUrl configured in sustainsys.Saml2) still has no User and I don't see any sort of error or anything.
Anyone with experience have an idea how to debug this?
The call to /Saml2/Acs should be taken care of by the Sustainsys.Saml2.HttpModule. It will process the response and then call the SessionAuthenticationModule to set a cookie that preservers the User across calls.
To get some more information about what's happening in the library, you can assign an implementation of ILoggerAdapter to Sustainsys.Saml2.Configuration.Options.FromConfiguration.SPOPtions.Logger to get some logging output from the library.
My issue turned out to be that I had another authentication module loaded before SessionAuthenticationModule and Saml2AuthenticationModule in the web config.
The comment in the example was
Add these modules below any existing. The SessionAuthenticatioModule
must be loaded before the Saml2AuthenticationModule
However in my case with I had another authentication module involved that needed to go last.

error in flutter and my phone is not responding never

I using google map on my app, and upload the code to my phone,
the problem is sometimes when I enter and exit to the map quickly,
the phone is not responding never !!! also I can't turn the phone off!!!
the only solution is re-upload the code again, only this is the solution to make my phone work!!
I try to see the output from the android studio, and I see like that
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Neither user 10737 nor current process has android.permission.WAKE_LOCK., null)
I wish you understand and help me!
The error clearly says that the app doesn't have the permission to unlock the phone by itself.
You should add the permission in your code and request it from the user.
If you search it on the net, you will find that Google maps in flutter sometimes needs the permission WAKE_LOCK.
You should add it to your manifest.

BlackBerry Looking up email address

I am working on a BlackBerry Application that is going to lookup the email address registered to the device. I am using this code to accomplish:
Session session = Session.getDefaultInstance();
System.out.println("############### got session ################");
if (session != null) {
Store store = session.getStore();
System.out.println("################ got store ######################");
ServiceConfiguration serviceConfig = store.getServiceConfiguration();
System.out.println("################ got config #####################");
email = serviceConfig.getEmailAddress();
}
This works perfectly for devices that have already registered an email address. But if the device doesn't have an address registered to it this line:
email = serviceConfig.getEmailAddress();
Never returns. So my entire application stalls out indefinitely. What is the best approach for solving this? My first idea is set a timer task that will set the email String to some default value such as "No Address Registered" after 1 or 2 seconds. Is there some better way to get notified that there was no email present other than the app just stalling out and doing nothing?
It turns out that serviceConfig.getEmailAddress(); throws an exception if there is no email registered. There is no mention of this in the BlackBerry documentation. It is also strange because if you do not catch that exception the method just never returns and your application will stall indefinitely. But to fix you can just surround that call with try/catch and set the email to default in the catch block.
Would have saved me a lot of time if this was actually documented correctly. I am hopefully that posting the answer here will save someone from chasing something that is undocumented.