question

MarawanMotje-5324 avatar image
0 Votes"
MarawanMotje-5324 asked ·

return back to mobile app with microsoft login


I have setup microsoft auth with firebase, now i want users to go back to my flutter app and i dont know how.

I see that there is a redirect URI in my azure portal, but im not sure what to put there. Any help?

azure-active-directory
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

vipulsparsh-MSFT avatar image
0 Votes"
vipulsparsh-MSFT answered ·

@MarawanMotje-5324 Thanks for reaching out. Can you share the document you are following for this process.
While checking the firebase docs, I found the following :

Unlike other OAuth providers supported by Firebase such as Google, Facebook, and Twitter, where sign-in can directly be achieved with OAuth access token based credentials, Firebase Auth does not support the same capability for providers such as Microsoft due to the inability of the Firebase Auth server to verify the audience of Microsoft OAuth access tokens.

Read more here and here


· 3 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for answering, im using https://pub.dev/packages/firebase_auth_oauth
It should integrate with firebase, as it states in the page. (i found this from this answer https://stackoverflow.com/questions/64066566/how-to-sign-a-azure-ad-user-into-firebase-in-a-flutter-mobile-app)

I have setup my app in azure AD, but when i try to login with my login function i get this answer from microsoft: https://postimg.cc/xXzvCvsz (invalid parameter redirect uri)
Now im not sure what im supossed to set my redirect uri to for a flutter app.

0 Votes 0 ·

@MarawanMotje-5324 Can you share what your application is sending as a redirect URI in request, you can capture that using a Fiddler trace. You can add the same redirect URI in the Azure App portal for your app.

0 Votes 0 ·

I have since fixed this issue, now i get this error:

https://pastebin.com/CUbJ6T9R

From what i can find online, the problem seems to be an invalid client secret in firebase. however, i dont understand how this could be the issue since i copied the field under "value" (azure AD -> my app -> certificates and secrets)

I dont know if this is the right place to ask, but do you know what went wrong?

0 Votes 0 ·