Login is successful, however, the AccessToken received does not have valid details to call the client API(not okta API).
To resolve this issue, I need to include some additional parameters to Auth0Client. Like, I need to pass the server Id and discovery endpoint.
public class Auth0Client
{
private readonly OidcClient oidcClient;
public Auth0Client(Auth0ClientOptions options)
{
oidcClient = new OidcClient(new OidcClientOptions
{
Authority = AppSettingsService.Settings.Secrets.OktaConfig.OrgUrl,
ClientId = options.ClientId,
Scope = options.Scope,
RedirectUri = options.RedirectUri,
Browser = options.Browser,
PostLogoutRedirectUri = options.POSTLogoutRedirectUri
});
}
I'm migrating my okta-implemented(via okta-SDK) Xamarin app to Maui.I have followed your blog(https://auth0.com/blog/add-authentication-to-dotnet-maui-apps-with-auth0/#Apply-Platform-Specific-Changes) to implement okta authentication in MAUI.
Login is successful, however, the AccessToken received does not have valid details to call the client API(not okta API).
To resolve this issue, I need to include some additional parameters to Auth0Client. Like, I need to pass the server Id and discovery endpoint. public class Auth0Client { private readonly OidcClient oidcClient; public Auth0Client(Auth0ClientOptions options) { oidcClient = new OidcClient(new OidcClientOptions { Authority = AppSettingsService.Settings.Secrets.OktaConfig.OrgUrl, ClientId = options.ClientId, Scope = options.Scope, RedirectUri = options.RedirectUri, Browser = options.Browser, PostLogoutRedirectUri = options.POSTLogoutRedirectUri }); }
Can you share your suggestion?
Thanks, Priya