Comments (20)
@dracan @nh43de If you still need this change you can build iOS nuget package form this branch https://github.com/Stavvor/auth0-oidc-client-net/tree/iOSworkaround
LogoutAsync
method is returning BrowserResultType
so you can react properly for usercancel or httperror
from auth0-oidc-client-net.
Same problem - if user starts logout process but clicks cancel on the iOS native prompt, there is no way to handle this. Not suitable for production.
from auth0-oidc-client-net.
Any updates on this one?
from auth0-oidc-client-net.
@Stavvor can you fix the link in your post? The text is correct, but the href=""
is incorrect.
BTW, I saw that you cancelled your PR to introduce this to the repo, why?
from auth0-oidc-client-net.
@Jehoel Thanks i fixed my link to point to the correct adress, I didn't mean to cancel this PR. It was probably an accident
from auth0-oidc-client-net.
Big thanks for this. I was previously unable to react to user cancellation at the prompt for LogoutAsync().
from auth0-oidc-client-net.
has anybody got a fix on this...
When calling LogoutAsync, if the logout redirect url hasn't been set up correctly, this logout will fail to work - but there's no indication that it's failed. LogoutAsync doesn't throw an exception, and there's no return value.
from auth0-oidc-client-net.
@tonyyyrocks39, the fix is in the master branch, but not in the nuget package 2.3.1 yet. You can build the master branch yourself to get the fix. That's what I did.
Tip: I had to convert the Auth0.OidcClient.Core project to a .Net Standard 2.0 project instead of .Net 4.6.
My guess is that it'll be in the nuget soon, but that's up to the Auth0 devs.
from auth0-oidc-client-net.
Basically, LoginAsync() will now return a Task of BroswerResult. You can check BroswerResult.ResultType for ResultType.Sucess or ResultType.UserCancel.
from auth0-oidc-client-net.
Question was about Logoutasync(),in platformwebview in the line return tcs.Task;(last line),it just stuck there ,it never returns a browerresult.
I guess this is the reason browser in not returning to the app again
from auth0-oidc-client-net.
Is your redirect url setup correctly? Use the same redirect url for logout as you use for login.
The ones from the callback url section here:
https://auth0.com/docs/quickstart/native/xamarin/01-login
Makes sure it's in your custom urls in info.plist and equivalent in iOS. (Follow the docs)
Main this is: use the same callback/redirect url for logout as login.
from auth0-oidc-client-net.
But again, if you're using the latest nuget (2.3.1) LogoutAsync() just retuns a plain Task. You'll need latest from master. And redirect url needs to be set in the Auth0 portal for your app.
from auth0-oidc-client-net.
Yes,Thanks for quick replies,but i have properly configured redirect url,problem is after that line tcs.Task it should ideally return to return browserResult.ResultType; in Logoutasync which is not happening,may be i need to look into master branch if incase something got changed in platformview class
from auth0-oidc-client-net.
Definitely try it if you're currently using the nuget. I have a few outstanding PRs waiting for review too. Check em out.
from auth0-oidc-client-net.
I just tried master branch,there also it seems have problem,browser does not return back to app
from auth0-oidc-client-net.
If you're able to login to an identity provider successfully, but the browser fails to close afterwards, then there is something misconfigured in regards to the logout callback url. So, let's clarify some things about your current setup:
-
Are your login callback url and logout callback url identical? They should be. And your callbacks should not contain "https". They should contain your iOS bundle identifier or your Android package name.
-
Have you ensured that the scheme of your callback url is entered in your info.plist on iOS and in the manifest in Android? This is imperative to the operating system knowing that it should close the browser when it encounters your custom url scheme.
Sorry if my questions seem excessive. I'm just fairly certain that something in regards to the callback url is misconfigured.
from auth0-oidc-client-net.
...also, have you made sure that your logout callback url is entered in the " Allowed Logout URLs" field of your app in the Auth0 web portal for your Auth0 application? That's also imperative. This means your callback url is entered in TWO fields in the Auth0 portal, not ONLY for the "Allowed Callback URLs" field.
from auth0-oidc-client-net.
@jsauve if you have some time,please look into the issue#45,I have put my entire codes there.
from auth0-oidc-client-net.
Somehow I made it to work..But still facing problem,Currently when I debug line by line,logout is happening successfully.But when I directly hit F5 logout not working
from auth0-oidc-client-net.
Is there anything left actionable on this issue? It's quite hard to follow. Suggest we continue discussion outstanding remaining issue on #45 ?
from auth0-oidc-client-net.
Related Issues (20)
- System.ArgumentException if using the same dictionary object as "extraParameters" argument in the "LoginAsync" function to log in multiple times HOT 3
- Impossible to login anymore, any recent breaking change ? HOT 10
- federated logout is not working on WinForms HOT 7
- Android Auth0Client Throwing Errors on Login: Error loading discovery document: Error connecting to https://<url>/.well-known/openid-configuration. The SSL connection could not be established HOT 5
- Scope set to null when calling RefreshTokenAsync HOT 14
- Login browser appears again after successfully login on Xamarin Forms (Android) HOT 12
- Token validation error (Android) HOT 4
- Uninstalling the app without logging out didn't clear the browser’s session cookie (Xamarin Android) HOT 1
- Error processing method: 'System.Void Auth0.OidcClient.Auth0ClientBase/<RefreshTokenAsync> HOT 2
- Auth0.OidcClient.WPF HOT 3
- Package Auth0.OidcClient.iOS 3.3.7 is not compatible with net7.0-ios16.1 (.NETCoreApp,Version=v7.0). Package Auth0.OidcClient.iOS 3.3.7 supports: xamarinios10 (Xamarin.iOS,Version=v1.0) HOT 15
- Error loading discovery document: Error connecting to https://yourDomain/.well-known/jwks.json HOT 8
- JsonSerializationException in .Net 7 for iOS Project HOT 2
- LogoutAsync Headless Browser Option HOT 5
- Documentation: Readme documentation link is broken HOT 1
- An option to open the Webview in full screen ( Maximized ) using Auth0.OidcClient.WPF HOT 1
- What does BrowserResultType.UserCancel indicates? HOT 8
- Error getting configuration for JWK in Auth0.OidcClient.Tokens because of incorrect metadataAddress (/.well-known/openid-configuration) HOT 1
- Allow environment override for WebView2 HOT 1
- browser window open after login HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auth0-oidc-client-net.