You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@cmatskas , thanks for the great work on the fastapi_microsoft_identity and your associated training on TalkPython. I have managed to get access tokens working with B2C and FastAPI but was stumped for a while with 401 errors. Having worked through it and got the module to work correctly I thought I would mention it to you for an update or comment.
However, when checking the access token being presented by a valid call, I noticed the version 1.0 token does not match the code above and is being presented as the second URL. By replacing the first URL with the second URL the token is accepted and operates as expected. Adjusted code below:
as an alternative (after spending waaaay too much time tracking down the issue) there is a setting in your azure portal to change the format of the iss in your token:
go to: Azure AD B2C->User Flows->[pick your flow]->properties->Token compatibility settings->Issuer (iss) claim and switch it to the one the contains your flow.
Hi.
@cmatskas , thanks for the great work on the fastapi_microsoft_identity and your associated training on TalkPython. I have managed to get access tokens working with B2C and FastAPI but was stumped for a while with 401 errors. Having worked through it and got the module to work correctly I thought I would mention it to you for an update or comment.
This is the original code in auth_service.py
However, when checking the access token being presented by a valid call, I noticed the version 1.0 token does not match the code above and is being presented as the second URL. By replacing the first URL with the second URL the token is accepted and operates as expected. Adjusted code below:
The text was updated successfully, but these errors were encountered: