Never goes back to the app
See original GitHub issueThe codes works well. My issue is, it never goes back to the app after logging in.
[Activity(NoHistory = true, LaunchMode = LaunchMode.SingleTop)]
[IntentFilter(new[] { Android.Content.Intent.ActionView },
Categories = new[] { Android.Content.Intent.CategoryDefault, Android.Content.Intent.CategoryBrowsable },
DataScheme = Constants.DataScheme,
DataHost = Constants.DataHost
)]
public class WebAuthenticationCallbackActivity : Xamarin.Essentials.WebAuthenticatorCallbackActivity
{
public WebAuthenticationCallbackActivity()
{
}
}
public static class Constants
{
public const string DataScheme = "oauth2test";
public const string DataHost = "callback";
//public static string AuthorityUri = "https://demo.identityserver.io";
//public static string AuthorizeUri = "https://staging-xoxo.se/Account/login";
public static string AuthorizeUri = "https://id-staging-xoxo.se/Account/login";
public static string TokenUri = "https://id-staging-xoxo.se";
public static string ApiUri = "https://api-staging-xoxo.se";
public static string RedirectUri = "oauth2test://callback";
public static string ClientId = "xoxo";
//public static string ClientSecret = "xoxo";
public static string Scope = "openid profile api roles userinfo";
}
private async void Button_Clicked(object sender, EventArgs e)
{
identityService = new IdentityService(new RequestProvider());
string url = identityService.CreateAuthorizationRequest();
Debug.WriteLine(url);
var authresult = await WebAuthenticator.AuthenticateAsync(
new Uri(url),
new Uri(Constants.RedirectUri)
);
string raw = ParseAuthenticatorResult(authresult);
authorizeResponse = new AuthorizeResponse(raw);
if (authorizeResponse.IsError)
{
Console.WriteLine("ERROR: {0}", authorizeResponse.Error);
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Asana never bring me back to the app after browser login
Go to the web version of Asana, click on the top right icon, select “My Settings.” Then, navigate to the “Apps” page of...
Read more >Why users quit apps and never come back | by Appsee
One of the most discouraging statistics for all app professionals out there is that people abandon the majority of apps they download, some...
Read more >Hide purchases from the App Store
To return to the App Store, tap Account Settings, then tap Done. Search for the app, then tap the download button .
Read more >I Got a Laser TV And I'm Never Going Back - YouTube
Laser TVs are the way of the future - the biggest and brightest screens for home theater or for everyday use, even in...
Read more >Never going back to the office? Facebook has an app for that.
The company is rolling out a virtual reality videoconference app as part of its "metaverse" future.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hie! has this been resolved yet? The code is elegant and easy to understand. Hope this issue gets resolved
You have to do the whole oAuth authentication manually if you do not want any web browser poping up.
The whole purpose of this code is to help with oAuth2 with IdentityServer using WebAuthentication and it uses native browser