Open pawelofficial opened 1 year ago
as pointed out 5 years ago here https://stackoverflow.com/questions/41581369/microsoft-application-redirect-uri-allows-localhost-but-not-127-0-0-1 one can change redirect url via manifest on Azure site to allow for http://127.0.0.1 which fixes the issue
You seemed to be going through the hard route to enable 127.0.0.1
which was not allowed in Azure Portal.
I believe you can try following our README, which references to a Quickstart guide, whose last step tells you to run your flask server with a --host=localhost
parameter, that way you would probably not run into this 127.0.0.1
issue at all. Please test and let us know.
Or you can pass the value in app.run(localhost="locahost") and can give the uri path in the azure directory
Or you can pass the value in app.run(localhost="locahost") and can give the uri path in the azure directory
Did you mean to say app.run(host="...")? I see no localhost parameter in Flask.run()'s docs.
Regardless, this sample itself does not intend to hardcode for localhost, because we do not want to support localhost-only. If anything, we just want to discourage 127.0.0.1.
i did, sorry
i did, sorry
That is OK. You are welcome. :-)
hi, this is my first time opening an issue so i apologize in advance for it's quality. Nevertheless i am following https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-authentication-sample-python-web-app tutorial and my redirect URI didn't match in step 5.4, exact message from flask: GET /getAToken.?error=redirect_uri_mismatch&error_description=AADB2C90006:+The+redirect+URI+'http://127.0.0.1:5000/getAToken'+provided+in+the+request+is+not+registered+for+the+client+id+'xxx-xx-xx-xx-xx'.%0d%0aCorrelation+ID:+xxx-xxx-xxx-xx-xxx%0d%0aTimestamp:+2023-05-03+10:03:02Z%0d%0a&state=jsaKCDnFuqMGzkrL
and when i hardcoded the redirect_uri in login route to "http://localhost:5000/getAToken." it worked.