- ABP Framework version: v7.0.0
- UI type:Maui Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace:
An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.AspNetCore.Components.MauiBlazor.AbpAspNetCoreComponentsMauiBlazorModule, Volo.Abp.AspNetCore.Components.MauiBlazor, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null: Cannot invoke JavaScript outside of a WebView context.
- Steps to reproduce the issue:"
Hi support.
I have created project with Ui MauiBlazor from abp suite.
First : I run HttpApi.Host project.
Second: I run MauiBlazor project as andriod emulator and give me this error as above.
Can you give me some solution please
12 Answer(s)
-
0
Hi,
I'd like to check it remotely, can we have a meeting? shiwei.liang@volosoft.com
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
I'd like to check it remotely, can we have a meeting? shiwei.liang@volosoft.com
Yes we can I sent you invitation on google meet
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
-
0Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
-
0
Could you try to run it in an emulator? As you know, I can't operate your physical device in the meeting, it's hard to find the problem
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Could you try to run it in an emulator? As you know, I can't operate your physical device in the meeting, it's hard to find the problem
Now it's work for me , I have Updated Operating System and reinstall Visual Studio
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Can I login with mobile without redirect to web page ?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
Yes, you can.
We use code flow by default, but if you want, you can use the password flow
You can check this to know how to get access token with password flow:https://github.com/abpframework/abp/blob/dev/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs#L61-L69
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
Yes, you can.
We use code flow by default, but if you want, you can use the password flow
You can check this to know how to get access token with password flow:https://github.com/abpframework/abp/blob/dev/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs#L61-L69
Thanx.
Just we need to change type from
code-flowto thepassword-flowin configuration and we can login without redirect to web page ?.Or we need to do some other changes in code ?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
Just we need to change type from code-flow to the password-flow in configuration and we can login without redirect to web page ?.
No, you need to create your own login page.
And update
ExternalAuthServiceto use password flow instead of oidcClientMarkdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
Just we need to change type from code-flow to the password-flow in configuration and we can login without redirect to web page ?.
No, you need to create your own login page.
And update
ExternalAuthServiceto use password flow instead of oidcClientHi,
I didn't find any where within
OicdClinetto set grantType password flowCould you write some hints or steps to change to password flow Please
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
I didn't find any where within OicdClinet to set grantType password flow
It's not easy, you need a lot of work to do.
- Create a login page
- Remove all
OidcClientandMauiAuthenticationBrowserused - Update
ExternalAuthService, for example:
public async Task<LoginResult> LoginAsync(string userNameOrEmailAddress, string password) { var client = _httpClientFactory.CreateClient(); var discoveryDocument = await client.GetDiscoveryDocumentAsync(configuration["OAuthConfig:Authority"]); var passwordTokenRequest = new PasswordTokenRequest { Address = discoveryDocument.TokenEndpoint, ClientId = configuration["OAuthConfig:ClientId"], UserName = userNameOrEmailAddress, Password = password, Scope = configuration["OAuthConfig:Scope"] }; var tokenResponse = await client.RequestPasswordTokenAsync(passwordTokenRequest); await _myProjectNameApplicationSettingService.SetAccessTokenAsync(tokenResponse.AccessToken); _currentUser = new ClaimsPrincipal(new ClaimsIdentity(new JwtSecurityTokenHandler().ReadJwtToken(tokenResponse.AccessToken).Claims, AuthenticationType)); UserChanged?.Invoke(_currentUser); return LoginResult.Success(); } public async Task SignOutAsync() { await _myProjectNameApplicationSettingService.SetAccessTokenAsync(null); _currentUser = new ClaimsPrincipal(new ClaimsIdentity()); UserChanged?.Invoke(_currentUser); }Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)



