hi
Provider access token means - When I login through auth0, there will be auth0 access token. So will my application functions or apis works with auth0 access tokens or not
There is no access token
obtained from auth0
You will only get user info
from auth0
.
Zero will get username
and email
etc..
if there is a user in the system with the same email, you will log in automatically.
If there is no user with your auto0 email. You will register a new user with this email, next time, you can log in automatically.
This is how external login works.
When you login in aspnetzero.com via your google account. zero only knows your google email, it can't get and use access token
to call google API.
hi
AuthenticationFailureException: OpenIdConnectAuthenticationHandler: message.State is null or empty.
Fixed by https://github.com/maliming/CDP-Base-Zero-13.0.0/commit/b12051c1a1e996d8a646943c594dd98ba1eef508
hi
Please share a username and password of auth0
What do you mean by provider access token
?
Thanks.
hi
Have you checked the source that I shared?
I have a multi tenant application. I want to enable both okta and auth0 for each tenant. As asp.net zero support only one authentication for a single tenant, I understand I need to customize the code.
You can add multiple OpenIdConnect as authentication providers. The string provider will be Auth0 or Okta
authenticationBuilder.AddOpenIdConnect("Auth0", options => ...
authenticationBuilder.AddOpenIdConnect("Okta", options =>
public ActionResult ExternalLogin(string provider, string returnUrl, string ss = "")
{
using (_googleOptions.As<TenantBasedOpenIdConnectOptions>().Change(new OpenIdConnectOptions()))
{
// Change the client id and secret to current OpenIdConnectOptions
var redirectUrl = Url.Action(
"ExternalLoginCallback",
"Account",
new
{
ReturnUrl = returnUrl,
authSchema = provider,
ss = ss
});
var properties = _signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl);
return Challenge(properties, provider);
}
}
https://github.com/aspnetzero/aspnet-zero-core/commit/7541fa92769e0ff340ccfb9424a5f58c62ca1c08 https://support.aspnetzero.com/QA/Questions/12204/How-can-I-enable-both-okta-and-auth0-for-a-tenant-using-openid#answer-0665e369-ea30-363f-9ae6-3a15cec05d04
Hi kan software
Can you share a project to reproduce?
In this way, we can quickly troubleshoot and solve the problem.
If UserLoginInfo
exists under a tenant, you must switch to this tenant.
hi
I have configured okta for a tenant using openid from its settings page. Now when I am calling this API it gives me Unknown external auth provider error.
Does UserLoginInfo(model.AuthProvider, externalUser.ProviderKey, model.AuthProvider)
exist on your database?
it generally coming from externalLoginInfo = await _signInManager.GetExternalLoginInfoAsync();
hi
These classes allow you to change the options at runtime. They get tenant settings values( from the database).
In fact, you can add multiple OpenIdConnect
as authentication providers.
authenticationBuilder.AddOpenIdConnect("Auth0", options => ...
authenticationBuilder.AddOpenIdConnect("Okta", options =>
The name
is the Auth0
or Okta