I’m adding OKTA authentication to the MAUI app based on this sample :
auth0-maui-samples/Sample at main · auth0-samples/auth0-maui-samples · GitHub .
I’m using “myapp://callback” for “Allowed Callbacks Urls” and “Allowed Logout Urls” in my Native OKTA app.
Login works fine in windows. But logout throws an error:
invalid_request : The “returnTo” querystring parameter “myapp://callback/?state=eyJhcHBJbn… tNDFmMy1hYmVkLTUwNzY5YT…” is not defined as a valid URL in “Allowed Logout URLs”.
Will appreciate any info.
I have the same issue if you paste the url you see in the error in the Allowed logout URLs it should work, but it looks like you have to call the logout function twice.
Thank you for your response!
Yes, I put entire url from error message, with query string included, and it works.
Could you please specify how should I call logout twice so I can try that approach too?
Currently i’m also still looking into this, but on my side i have to logout “twice” before it works. Do you have the same issue?
My code is currently based on this project from auth0: GitHub - auth0-blog/dotnet-maui-auth0-app
for logout i use the exact same code as here: dotnet-maui-auth0-app/MainPage.xaml.cs at main · auth0-blog/dotnet-maui-auth0-app · GitHub
I’m using this sample auth0-maui-samples/Sample at main · auth0-samples/auth0-maui-samples · GitHub. And I only had issue with windows app logout so far. It worked perfectly in Android and IOS. As I mentioned before, it was fixed in Windows by putting that big url in the error message into “Allowed logout urls” as you advised. I didn’t tried “twice logout”.
I think I’ll leave it as is for now.