Simplified it to pretty much just login in and returning the token, i then put a break point to see what the token is and it never gets there. It is as if the login page never returns to my app.
Basically i run my : await _auth0Client.LoginAsync();
the app opens a browser and i type in my details, click login and the web site sort of flickers and goes back to itself. I can see that the user has logged in from the dashboard, but it never goes back to my app. If i click login again, it just gives me the “something went wrong” screen from auth0.
Unfortunately it’s not a repo developed by Auth0 and we have no information about it so I’m afraid we as Auth0 team won’t be able to help you with that however maybe someone from our community will be able to give you a helping hand!
The second link in your list is exactly the one i used for creating my test app. Or to be more precise it was the link i posted at the top and the link to the blog you posted. Those are both created by the same person one based on the other. This is exactly what i am having my issues with. It simply is not working.
Thank you for your other links i will have a look at those.
I have copied all the code from your sample, first link in your post.
I have gone through the quick start guide to make sure that i am not missing anything. and still it does not work.
The user logs in, the browser even sends the user back to the app after, but the app never gets any response. it just sort of goes back to the “login” screen. I don’t see the welcome message, nor when i put in a break point does it arrive after the Client.LoginAsync();
I don’t know if this is related to the latest version of Xamarin perhaps? i can see that your sample runs on a fairly old version.
That is correct. As this repo lies in our auth0-community org it means that it is no longer actively maintained by Auth0 employees. If you’d like to have it updated then you need to open a pull request for that and this way we can review and potentially merge it.
You’re talking about Daniel-Krzyczkowski repo or the other links I attached?
Our Xamamrin Forms repo which lies under auth0-comunity GitHub org is a repo that was some time ago developed by Auth0 but is no longer actively maintained by us (there’s a note in the repo) due to bandwidth issues in our SDK team. The repo is currently community maintained which means we take a look from time to time and review PRs but that’s not the regular work we put in our other repos.
It might be out of date and some of the things might not be working now due to package versions changes etc. Sorry for the inconvenience!
No i am not referring to those. I was referring to those earlier in the conversation and you have already repeatedly absolved your team of any responsibility of maintaining those the samples and the text of your blog entries.
To be blunt i am not exactly thrilled that you feel that blog entries that are on your web site and have somewhat incorrect or incomplete information are not considered the responsibility of Auth0.
But as it is the case, there is nothing left to do.
However what i am indeed referring to now and in my last post is the quick start guide. Is that also not the responsibility of Auth0 to maintain it with up to date information?
This repo: GitHub - auth0-samples/auth0-xamarin-oidc-samples: Auth0 OIDC Client with Xamarin applications is the one I referred in my previous response. Until we get a PR implementing the change or fixing something that is broken Auth0 is not actively taking care of those repos implementing changes improvements etc. We review PRs and potentially merge them but not contribute to that repo without external users’ PRs.
I have just reached out the the Guest Author (the author of the repo) that you’re using so he can shed some light and help us troubleshoot your hurdle
You need to make sure that you configure iOS and Android correctly or you will not get the callback.
On iOS you need to specify URL types in the info.plist for example net.appecho.app. You also need
public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
{
ActivityMediator.Instance.Send(url.AbsoluteString);
return true;
}
The OpenUrl method goes in the AppDelegate for your iOS app.
For Android you need to define an IntentFilter as part of MainActivity.
Because the intent uses attributes you cannot specific the values as variables or constants. I could not get that working on the app using Auth0. If you have to support multiple environments you will need to use #if statements.
Then as part of the MainActivity you need OnNewIntent method.
protected override void OnNewIntent(Android.Content.Intent intent)
{
base.OnNewIntent(intent);
Auth0.OidcClient.ActivityMediator.Instance.Send(intent.DataString);
}
If you are using Xamarin Forms you may want to use a Factory to create the Auth0Client. This allows you to have your login code shared.
In case someone runs into this issue later down the road - the problem is that the original repo is missing this line from the MainActivity Activity attributes: