Open Closed

Blazorise web assembly Product token where to store securely #10002


User avatar
0
aziz.bouhejba created

Hi, we followed your documentation to get a Blazorise product token and it works great. We also have an app matching your template of web assembly Blazor app.

We're trying to secure the product token and not serve it in app settings or whatever so it's not public but can't find a way.

We have an Azure key vault in the host project that we can contact to get the token but we can't pass the value to the web assembly.

Any way to do this properly?

Thanks


8 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    There is no secure way to keep the Blazorise product token hidden from the client in a Blazor WebAssembly (WASM) application. In WASM, all application code and configuration—including any tokens or secrets—are downloaded to the user's browser, making it impossible to keep such values confidential.

    Even if you retrieve the product token from Azure Key Vault in your host project, you cannot securely pass it to the WASM client without exposing it. Any method of injecting the token into the client (such as via API, configuration, or JavaScript interop) will ultimately make it accessible to end users.

    The Blazorise product token is intended to be used on the client side, and the licensing model assumes it will be visible in the distributed application. This is a limitation of all client-side web technologies, not just ABP or Blazorise.

    If you require the product token to remain secret, you would need to use a server-side Blazor (Blazor Server) or another server-rendered technology, where the token can be kept on the server and not exposed to the client.

    Sources:


    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    aziz.bouhejba created

    So we need to expose the Blazorise product token there's no other way?

  • User Avatar
    0
    alper created
    Support Team Director

    When adding Blazorise middleware, you basically enter your token key. Encrypt your token via ABP's Encryption library and write the encrypted text rather than the token itself. This way, you can make it harder to be accessed.

    services
        .AddBlazorise( options =>
        {
            options.ProductToken = _stringEncryptionServce.Decrypt("xxxxxxx");
        } )
    
  • User Avatar
    0
    aziz.bouhejba created

    Hi, thanks I tried it, gave me this error System.PlatformNotSupportedException: Algorithm 'Aes' is not supported on this platform.

    I guess I'll just have to put it in the clear? :/

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The ABP string Encryption may not be compatible with Blazor WASM. The browser doesn't support all encryption methods.

    I will ask the Blazorise team for this case.

    https://blazorise.com/support/issues/338/how-to-protect-our-producttoken-in-wasm-app

    Thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The Blazorise team response:

    Hello! As mentioned in the previous discussion, there’s really no completely secure way to hide the product token in a Blazor WebAssembly application. A determined and technically skilled user could always inspect the compiled assemblies and extract it.

    That said, the product token isn’t meant to be secret, unlike the license key that comes with your subscription. The token is time-limited and automatically expires after a certain period. In most cases, Blazorise is used in** line-of-business (LOB)** applications where the risk of token exposure is minimal. Only in large, public-facing apps with many technically savvy users could this become a concern.

    As for storage, the best approach is to embed the product token directly in your assembly rather than loading it from an external source at runtime.

  • User Avatar
    0
    aziz.bouhejba created

    Thanks a lot

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You're welcome. : )

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on October 27, 2025, 08:34