Hi guys,
I’m Auth0 user since 2016 and I’m happy with my WPF app using my own login Username-Password-Authentication form and Auth0.Windows.dll.
Something like this:
auth0.LoginAsync(connection: DbConnectionNameTextBox.Text, userName: UserTextBox.Text, password: PasswordTextBox.Password).ContinueWith(t =>
{
if (t.IsFaulted)
this.textBox1.Text = t.Exception.InnerException.ToString();
else
this.textBox1.Text = t.Result.Profile.ToString();
},
TaskScheduler.FromCurrentSynchronizationContext());
Now I need to add another tenant for some specific user group, but looks like I can’t use Auth0.Windows.dll with new tenant since it’s got deprecated.
Unfortunately I couldn’t find anymore any examples of Connection (not Widget) login in Auth0.OidcClient.WPF sample app.
I wonder is there a way to to still have my own login form in WPF app with modern Auth0 SDKs?
Edit: One more question.
Is there a way to read user profile app_metadata at the login?
Since there is no anymore Profile property in the login result.
Kind regards,
Andrei
Hi Andrei.
The new OIDC client for .Net uses web-based authentication, which has a number of advantages:
- Your application does not handle passwords directly (more security, less things to worry about)
- The authentication parts are removed from your application, which means that you can make changes after your application has been distributed. You can add different connections, change the UX, add MFA, and so on.
- You can support social connections
- You get SSO if more than one application uses the same type of authentication
When you use web-based authentication, Auth0 displays the Hosted Login Page if the user needs to be authenticated. The Hosted Login Page uses Lock by default, but you can customize it and draw your own (web-based) UI. See the “Custom Login Form” template when customizing the login page, which uses Auth0.js.
Hope that helps!
Hi Nicolas,
thank you. I will study that.
Kind regards,
Andrei
1 Like
Hi guys,
when I do like this in my wpf app:
var extraParameters = new Dictionary<string, string>();
extraParameters.Add("connection", "Username-Password-Authentication");
loginResult = await auth0client.LoginAsync(extraParameters);
On the second login attempt Auth0 Lock widget doesn’t ask me credentials anymore.
Before I deliver this to my customers I’d like to know which way Auth0 understands that the user is the same and how long it keeps it remembered.
I couldn’t see that in the documentation and the examples. Any help would be appreciated.
Kind regards,
Andrei
Hey there!
Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.
Wanted to reach out to know if you still require further assistance?