Closed leosimanonok closed 4 months ago
You mentioned in similar issues that its probably a problem with the state parameter being passed to the custom uri, do you have an example of how it should look for the RedirectionCheck to work properly?
Was my own fault not propagating the state parameter properly
@leosimanonok Can I ask you how did you solve this problem? I have exactly the same problem and cannot wrap my head around this. Your help would be greatly appreciated.
@483005 When you start authentication process, "state" value is passed in the authorizeUri as a query parameter. It has to be returned back to callbackUri when auth is finished, as winUiEx library handles that state value and if it matches the one sent initially it will automatically close the new app instance (you won't even see it start as it happens instantly).
So if you are connecting to your auth api, make sure to read and pass back that state query parameter, or if you are using someone else auth (google, apple, etc.), they should do it automatically.
In my MAUI app I've added
to \Windows\App.xaml.cs, but the conditional is always returning true, so I end up with another instance of my app, rather than my access token.
I followed the instructions from https://dotmorten.github.io/WinUIEx/concepts/Maui.html