microsoft-identity-web
microsoft-identity-web copied to clipboard
[Question] Localization on flow cancellation with Azure B2C
Following https://github.com/AzureAD/microsoft-identity-web/issues/1458 , localization works nicely when redirecting to the identity provider from an .Net 6 application using the library with Azure B2C.
When the user cancels an Azure B2C signin flow, the OnRemoteFailure is invoked and the user redirection is handled here https://github.com/AzureAD/microsoft-identity-web/blob/52c4f8b6ca0217b303669417b57f962409cf342e/src/Microsoft.Identity.Web/AzureADB2COpenIDConnectEventHandlers.cs#L89
The process of cancelling the flow, however, makes me lose the ui_locales, so that the default language is displayed to the user, instead of what was sent at the beginning of the sign in flow.
For example, if the default language in the app and azure b2c is set to French, but the user sets the localization to english (cookie) using the localization library, and clicks the sign in button from the .Net 6 razor Pages app, he is properly channelled to an english version of the Azure B2C sign in flow, but if he cancels the operation, he will go back to the app in the (default) French locale.
It seems that in OnRemoteFailure
the ui_locales is already lost on its way back to the app, so that I fail to do something like in the issue https://github.com/AzureAD/microsoft-identity-web/issues/1458 .
Any help on how to do this is greatly appreciated.
Is this still an issue with the latest version? 2.15.5?
Hi @jennyf19 , sorry I can't tell you because I shifted from the library and I fxed it on my own (and that was some time ago...). Felle free to close and thanks for the input.