Hi. I'm trying to implement a login flow with Microsoft Account on Azure Active Directory, using Firebase Auth in a Flutter app, but it keeps giving me an error.
My code is basically this (it's Dart, but it wasn't an option in "development language" dropdown button).
I click Login, the popup shows, I insert my e-mail, it sends a verification code to my e-mail, I insert the code.
Now it asks me to log in with an administrator account because I don't have permission to access the resources in my organization.
It gives me another option, to return to the app without granting authorization.
When I click it, an error shows:
AADSTS900561: The endpoint only accepts POST requests. Received a GET request.
Request ID: dc57b575-55a9-4b4c-9e31-8be7b88a0500
Correlation ID: f567a231-9c6c-43ed-91c8-9ef06569c212
I don't have a clue what can I do to make this thing work. Tried searching on the web, reading documentation, even asking for Bing AI, ChatGPT and Bard. They don't have any clue either.
I beg you for help. Thanks in advance.
final microsoftProvider = OAuthProvider('microsoft.com');
microsoftProvider.setCustomParameters({
'tenant': 'tenant ID',
});
microsoftProvider.addScope('mail.read');
var credential =
await FirebaseAuth.instance.signInWithPopup(microsoftProvider);